How do you set the property of a Div for "-ms-transform" in JavaScript?
I want to rotate a DIV like follows:
-ms-transform: rotate(30deg);
Any help would be great :)
Try this:
document.getElementById('myDiv').style.msTransform = 'rotate(30deg)';
element.style['transform'] = 'rotate(30deg)';
element.style['msTransform'] = 'rotate(30deg)'; // IE
element.style['MozTransform'] = 'rotate(30deg)'; // Firefox
element.style['WebkitTransform'] = 'rotate(30deg)'; // Chrome
element.style['OTransform'] = 'rotate(30deg)'; // Opera
Here's an example: http://jsfiddle.net/mgWCm/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With