quangthang2004 Posted March 16, 2012 Share Posted March 16, 2012 Dear All, I am going to do a plugin that can rotate any element with dynamic angle when using this. But I donot know how to do. If someone who experienced this matter, Please help me to do. I will be gratefull If someone consider my request. Thanks in advance, Link to comment Share on other sites More sharing options...
Ingolme Posted March 16, 2012 Share Posted March 16, 2012 You can use the transform CSS3 property: function rotateElement(element, angle) { element.style.transform = "rotate(" + angle + "deg)"; // Standard element.style.MozTransform = "rotate(" + angle+ "deg)"; // Firefox element.style.msTransform = "rotate(" + angle + "deg)"; // Internet Explorer element.style.webkitTransform = "rotate(" + angle + "deg)"; // Webkit browsers element.style.OTransform = "rotate(" + angle+ "deg)"; // Opera} Of course, this won't work in browsers older than IE9. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.