is the JS equivalent of -ms-transform MSTransform? or msTransform?
Now before I go any further, if you don’t know what Vendor Prefixes are then take a look at this primer.
var element = document.getElementById("myDiv");
element.style.msTransitionDuration = "3s";
Generally CSS is case-insensitive (except with XHTML in some browsers). However, it’s best practice with vendor prefixes to have them lowercase, the spec that covers this can be found here. Therefore CSS vendor prefixes look like this:
- -moz-transform (FireFox)
- -ms-transform (Internet Explorer)
- -o-transform (Opera)
- -webkit-transform (Safari, Chrome)
In Internet Explorer, Microsoft Lowercase the first Letter, which makes it consistent with the CSS capitalisation:
With FireFox, Mozilla uppercases the first letter – (Capitalising the first Letter seems to be the convention, however, I couldn’t find a reference to any standard that states a capital, if you know of one please point me to it in the comments and I will update)
Opera also uppercases the first letter:
And in Chrome and Safari you can use either Lower case or uppercase
- webkitTransform or WebkitTransform
Of course when a property is not vendor prefixed (the property has been fully standardised and browsers no longer needs the vendor prefix) then you simply drop the prefix: