How am I supposed to achieve valid CSS3 on W3C's CSS validator if I use properties with vendor prefixes like -webkit-border-radius and -moz-box-shadow?

有帮助吗?

解决方案

In the Vendor Extensions combo select Warnings.

其他提示

You don't. Vendor prefixes are not valid CSS, therefore it will not pass as valid in the W3C validator. In the future, when they won't be needed anymore, the normal CSS rules will pass as valid CSS.

Do you need to validate... for a client or a boss?

If not, I would say that validation is the goal... but only as a way to help you write good code and to catch simple errors from bad typing or bad memory.

If you need to do it (validate), either ignore the errors dealing with the prefixes or comment those out when you are validating.

Actually you can do something with jQuery. Write your css code without css3 vendor prefixes and then this plugin can help you!!

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