Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

css - -ms-animation should I include this for older browsers?

As the title states I was wondering if this should be used.

According to MS documentation simply using "animation" is now the default for IE10 (which is why i had a green squiggle)

After looking this up and fixing it, I wondered, should I still include this line "-ms-animation"

Can anyone say if it is needed for older browsers, or did removing the need for an "-ms" prefix apply retroactively?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The -ms- prefix was required for animations, transitions, gradients and font-feature-settings in pre-release versions of Internet Explorer 10. The Release Preview and stable version of IE10 support all of the aforementioned features unprefixed (as do IE11 and Microsoft Edge, needless to say).1

Even if you somehow got hold of a pre-release build of IE10, it's not even going to run anymore because all pre-release builds expired within a year after their release.2

So -ms- is no longer needed for animations, transitions, gradients and font-feature-settings, because no version of any Microsoft browser in existence requires the prefix anymore. You are just needlessly increasing file size and wasting bandwidth by including the prefix for those features.

While we're at it, it's an equally unnecessary waste of bandwidth to include -ms-transform in any animation or transition styles, because the only version of IE that requires the -ms- prefix for transforms is IE9, which doesn't support animations or transitions anyway.


1 Ironically, thanks to IE's historically long development cycle, Microsoft is the only vendor to have followed the process of prefixing experimental features faithfully from start to finish: prefixing in unstable builds, and shipping to production unprefixed, reserving public-facing prefixes only for vendor-specific features.

2 If you think "a year" sounds like a long time, here's a bit of perspective for you: the first Platform Previews of IE10 were distributed in 2011 — six years ago. That's even longer than the gap between IE6 and IE7 (just five years)!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...