开发者

Why did Mozilla...safari have to make CSS more inconvenient with "-moz" and "-webkit" tags?

开发者 https://www.devze.com 2023-02-11 04:16 出处:网络
Odd question maybe, but can\'t find an explanation anywhere. Just don\'t see why the extra -moz and -webkit tags were necessary for new CSS3 properties when they could of kept it simple like the rest

Odd question maybe, but can't find an explanation anywhere. Just don't see why the extra -moz and -webkit tags were necessary for new CSS3 properties when they could of kept it simple like the rest of the standard CSS properties. Wouldn't it be more simple to just use "box-shadow" for all browsers instead of using -moz-box-shadow and -webkit-box-shadow... Can someone explain why it is like this? I must be missing开发者_开发问答 something.


Vendor prefixes are there for properties which are proprietary or experimental.

Most of the CSS 3 specifications are not yet Candidate Recommendations, they are still being developed and subject to change.

Many of the properties covered by specifications which are Candidate Recommendations or more advanced are still being polished by the browser vendors who don't consider their own implementations ready.

The prefixes are dropped when the properties are considered ready for mainstream use. You'll see a specific example of this when Firefox 4 is released, when it starts supporting the standard box-shadow declaration rather than requiring -moz-box-shadow.


The "vendor extensions" are part of the W3C recommendation and let developers use new properties that are not finalized yet and won't get flagged as errors by the validator (eventually). For example, webkit and gecko handle some new CSS3 properties differently because the spec was not finalized till after they were used in those browsers.

0

精彩评论

暂无评论...
验证码 换一张
取 消