Why do browsers need vendor prefixes for CSS3? What is stopping them from just using the standard CSS3 properties? [duplicate]

StackOverflow https://stackoverflow.com/questions/8461252

  •  13-03-2021
  •  | 
  •  

Possible Duplicate:
Why do browsers create vendor prefixes for CSS properties?

For example, if I have an image that I'd like to rotate, why does Google Chrome do nothing when I use transform: rotate(50deg); but work fine when I use -webkit-transform: rotate(50deg);?

Isn't the whole point of having the standard to make it so that a programmer/designer only writes the same code once, and not once for each of the browsers? Is this something that is going to be changed in the foreseeable future or will it always be this way? I'm only just starting to use CSS3 and this seems really bizarre to me.

有帮助吗?

解决方案

CSS3 has not been formally adopted as a complete standard yet—it is still a draft proposal.

Vendor specific tags allow the vendors to begin to implement CSS3 draft standards or proposed ideas for CSS3 now using experimental implementations, while ensuring that their current rendering with these proprietary tags can be distinguished in the future from their rendering of the actual CSS3 tag as per the final spec, even if that is different.

其他提示

The standard statements have not been implemented and the prefix is for vendors to test and implement proprietary functions. As the code becomes stable browsers should start to use the standard statement.

It is thereby important for you to always leave the non prefixed statement at the end like so:

-o-transition: all 1s linear;
-ms-transition: all 1s linear;
-moz-transition: all 1s linear;
-webkit-transition: all 1s linear;
transition: all 1s linear;

Since Cascade Stylesheets get their name for cascading. The standard statement will override the rest as it becomes available.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top