想要在jquery中旋转元素 [英] Want to rotate element in jquery

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

问题描述

我正在尝试使用句柄(handle => div)旋转元素(任何元素div,p ..),我放置在元素的左上角角落,现在我的问题是该元素没有完全旋转到360度,任何人都可以帮忙:

I am trying to rotate an element (any element div,p..) with the handle (handle=>div) which I placed on the element's top-left corner, now my problem is that the element does not fully rotate to 360 degree, can anyone please help out :

$("#elementid").live('mouseover', function () {
    $(this).draggable({ handle: "#handleid", drag: function (event, ui) {
        var rotateCSS = 'rotate(' + ui.position.left + 'deg)';
        alert(ui.position.left);
        $(this).parent().parent().css({
            '-moz-transform': rotateCSS,
            '-webkit-transform': rotateCSS
        });
    }
    });
});


推荐答案

这些是同一类别的stackoverflow中的问题

these are question in stackoverflow in the same category

如何旋转div

尝试使用jQuery控制css3转换命令来旋转div元素

在jQuery中旋转Div元素

如何使用jQuery旋转div

在第二个链接上点亮它的瑕疵

take alook at the second link its briliant

live rotate和其他css demo brillian http://css3please.com/

看看这是准确的

.box_rotate {
  -webkit-transform: rotate(7.5deg);  /* Saf3.1+, Chrome */
     -moz-transform: rotate(7.5deg);  /* FF3.5+ */
      -ms-transform: rotate(7.5deg);  /* IE9 */
       -o-transform: rotate(7.5deg);  /* Opera 10.5 */
          transform: rotate(7.5deg);
             filter: progid:DXImageTransform.Microsoft.Matrix(/* IE6–IE9 */
                     M11=0.9914448613738104, M12=-0.13052619222005157, M21=0.13052619222005157, M22=0.9914448613738104, sizingMethod='auto expand');
               zoom: 1;
}

更新:

请注意在http://css3please.com/上注意这一点。

这篇关于想要在jquery中旋转元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆