Ordering in vendor based CSS3 Vs Standard CSS3 syntax

后端 未结 3 940
北海茫月
北海茫月 2020-12-06 03:19

In order to achieve cross-browser compatibility, we tend to use both vendor specific extensions and standard CSS3 syntax. I know CSS3 is still in draft, but we have alre

3条回答
  •  臣服心动
    2020-12-06 03:27

    When writing CSS3 properties, the modern wisdom is to list the "real" property last and the vendor prefixes first.

    Another thing to think about when you do include the non-prefixed property is to put it after the vendor-prefixed versions. When a browser implements the standard version of a property, as specified in the relevant CSS3 specification, you most likely want it to use that implementation instead of the experimental, browser-specific version (which it will likely still support to be backwards-compatible). Putting it last should ensure that it will override the vendor-prefixed implementation.

    See Ordering CSS3 Properties

    See also : Remember non-vendor-prefixed CSS 3 properties (and put them last)

提交回复
热议问题