<tfoot id='Ji9ce'></tfoot>
<i id='Ji9ce'><tr id='Ji9ce'><dt id='Ji9ce'><q id='Ji9ce'><span id='Ji9ce'><b id='Ji9ce'><form id='Ji9ce'><ins id='Ji9ce'></ins><ul id='Ji9ce'></ul><sub id='Ji9ce'></sub></form><legend id='Ji9ce'></legend><bdo id='Ji9ce'><pre id='Ji9ce'><center id='Ji9ce'></center></pre></bdo></b><th id='Ji9ce'></th></span></q></dt></tr></i><div id='Ji9ce'><tfoot id='Ji9ce'></tfoot><dl id='Ji9ce'><fieldset id='Ji9ce'></fieldset></dl></div>

    • <bdo id='Ji9ce'></bdo><ul id='Ji9ce'></ul>

    1. <small id='Ji9ce'></small><noframes id='Ji9ce'>

      <legend id='Ji9ce'><style id='Ji9ce'><dir id='Ji9ce'><q id='Ji9ce'></q></dir></style></legend>

        在 jQuery 中转换

        时间:2023-10-13
        <tfoot id='8WFcC'></tfoot>
        <i id='8WFcC'><tr id='8WFcC'><dt id='8WFcC'><q id='8WFcC'><span id='8WFcC'><b id='8WFcC'><form id='8WFcC'><ins id='8WFcC'></ins><ul id='8WFcC'></ul><sub id='8WFcC'></sub></form><legend id='8WFcC'></legend><bdo id='8WFcC'><pre id='8WFcC'><center id='8WFcC'></center></pre></bdo></b><th id='8WFcC'></th></span></q></dt></tr></i><div id='8WFcC'><tfoot id='8WFcC'></tfoot><dl id='8WFcC'><fieldset id='8WFcC'></fieldset></dl></div>
          • <bdo id='8WFcC'></bdo><ul id='8WFcC'></ul>

            <small id='8WFcC'></small><noframes id='8WFcC'>

                <tbody id='8WFcC'></tbody>
              1. <legend id='8WFcC'><style id='8WFcC'><dir id='8WFcC'><q id='8WFcC'></q></dir></style></legend>

                  本文介绍了在 jQuery 中转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试使用 jquery 获得一个元素来动画旋转悬停效果,我有这个 jsFiddle 去测试.到目前为止,我有这个:

                  I'm trying to get an element to animate a rotation hover effect using jquery, I have this jsFiddle going to test. So Far I have this:

                  $(".icon").hover(function() {
                          $(this).stop().animate({transform: "rotate(-90deg)", height: "200px"},400);
                      },function() {
                          $(this).stop().animate({backgroundColor : "black", color: "red"},400);
                      });
                  

                  但它似乎根本没有旋转它,我意识到设置 css 的正确方法是:

                  But it doesn't seem to be rotating it at all, I realize the proper way to set the css is:

                  -webkit-transform: 旋转(30度);

                  -webkit-transform: rotate(30deg);

                  我试过了:

                  $(this).stop().animate({-webkit-transform: "rotate(-90deg)", height: "200px"},400);
                  

                  但即使是高度也不会改变.任何建议都会有所帮助,谢谢!

                  but then even the Height doesn't change. any advice would help thanks!

                  链接到 JSFiddle

                  推荐答案

                  使用优秀的 jQuery Rotate 插件.http://code.google.com/p/jqueryrotate/.所有主流浏览器都支持它

                  Use the excellent jQuery Rotate plugin. http://code.google.com/p/jqueryrotate/. It is supported by all major browsers

                  * Internet Explorer 6.0 >
                  * Firefox 2.0 >
                  * Safari 3 >
                  * Opera 9 >
                  * Google Chrome 
                  

                  要旋转图像,您需要做的就是 $('#myImage').rotate(30)//用于 30 度旋转其中 #myImage 是您要旋转的元素的 id.

                  To rotate an image, All you need to do is $('#myImage').rotate(30) //for a 30 degree rotation Where #myImage is the id of the element you want rotated.

                  要动画旋转,你可以使用 setTmeout ex:

                  To animate rotation, you can use setTmeout ex:

                  setTimeout(function() { $('#myImage').rotate(30) },5)
                  

                  这篇关于在 jQuery 中转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:想要在旋转时显示元素的厚度 下一篇:如何围绕轴旋转 Three.js Vector3?

                  相关文章

                  最新文章

                  <legend id='T8iqw'><style id='T8iqw'><dir id='T8iqw'><q id='T8iqw'></q></dir></style></legend>

                  <small id='T8iqw'></small><noframes id='T8iqw'>

                  1. <i id='T8iqw'><tr id='T8iqw'><dt id='T8iqw'><q id='T8iqw'><span id='T8iqw'><b id='T8iqw'><form id='T8iqw'><ins id='T8iqw'></ins><ul id='T8iqw'></ul><sub id='T8iqw'></sub></form><legend id='T8iqw'></legend><bdo id='T8iqw'><pre id='T8iqw'><center id='T8iqw'></center></pre></bdo></b><th id='T8iqw'></th></span></q></dt></tr></i><div id='T8iqw'><tfoot id='T8iqw'></tfoot><dl id='T8iqw'><fieldset id='T8iqw'></fieldset></dl></div>
                    • <bdo id='T8iqw'></bdo><ul id='T8iqw'></ul>

                      <tfoot id='T8iqw'></tfoot>