Difference between behavior and -ms-behavior

135 views Asked by At

I don't understand the difference between behavior and -ms-behavior. I thought behavior was already only for Microsoft's Internet Explorer, so why is there a vendor prefix version?

Does it make any sense to use both or just -ms-behavior?

2

There are 2 answers

1
Henry Zhu On BEST ANSWER

Internet Explorer versions 5 and above support the behavior property.

Internet Explorer Version 8 supports the syntactically correct Vendor Specific Extension format of-ms-behavior.

The majority of the time you only need behavior, unless you want to totally force IE8 versions to run in standard mode. Then you should use ms-behavior. But adding both doesn't hurt you at all and it probably is a good practice anyways.

0
captainsac On

Windows Internet Explorer 8. The -ms-behavior attribute is an extension to CSS, and can be used as a synonym for behavior in IE8 Standards mode.

Check https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx for more information