我正在尝试使用我放置在元素 左上角,现在我的问题是元素没有完全旋转到 360 度,任何人都可以帮忙:
$("#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中的问题
如何旋转div
trying to rotate a div element with jQuery controlling css3 transform command
Rotating a Div Element in jQuery
How to rotate a div using jQuery
看看第二个链接吧
live rotate and other 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;
}
更新:
请注意 note this on http://css3please.com/ 页面中间这个不错的添加
关于javascript - 想在 jquery 中旋转元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10908760/