开发者

Validate CSS: Opacity?

I'm doing a new site and getting the following error:

Property opacity doesn'开发者_如何学Got exist in CSS level 2.1 but exists in : 0.5  0.5

For this chunk of CSS:

.nav-next img, .nav-previous img, #all-headers img {
 opacity: 0.5;
}

This is using the Jigsaw W3C Validator.

I see opacity in CSS3.

Am I missing something in my stylesheet, or is this a validator error, or a bit of both? And how do I fix it?


The Jigsaw default validation type is for CSS2.1, as CSS3 is not a full standard yet. You just need to select CSS3 as your validation type to make sure that it doesn't come up as an error from CSS2.1.

opacity is not part of the CSS2.1 spec, as detailed here: http://www.w3.org/TR/CSS2/


you answered it by yourself... opacity is css3, the validator said is doesn't exist in 2.1. use "more options" and choose the "css level 3" to check for css3 and avoid this error.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜