简体   繁体   English

W3C验证程序中的CSS不透明度错误

[英]CSS Opacity error in W3C Validator

I need to W3C CSS Validator logo for my website. 我需要网站的W3C CSS验证程序徽标。 Due to some error I m not getting it. 由于某些错误,我无法理解。 I need your help to get them logo. 我需要您的帮助才能获得徽标。 Here is W3C Error List 这是W3C错误列表

100 .jdGallery a.right, .jdGallery a.left Parse Error opacity=20) 100 .jdGallery a.right, .jdGallery a.left Property -moz-opacity doesn't exist : 0.2 0.2 100 .jdGallery a.right, .jdGallery a.left Property -khtml-opacity doesn't exist : 0.2 0.2 100 .jdGallery a.right, .jdGallery a.left Property opacity doesn't exist in CSS level 2.1 but exists in : 0.2 0.2 103 * html .jdGallery a.right, * html .jdGallery a.left Parse Error opacity=50) 106 .jdGallery a.right:hover, .jdGallery a.left:hover Parse Error opacity=80) 106 .jdGallery a.right:hover, .jdGallery a.left:hover Property -moz-opacity doesn't exist : 0.8 0.8 106 .jdGallery a.right:hover, .jdGallery a.left:hover Property -khtml-opacity doesn't exist : 0.8 0.8 106 .jdGallery a.right:hover, .jdGallery a.left:hover Property opacity doesn't exist in CSS level 2.1 but exists in : 0.8 0.8 122 .withArrows a.open Property -moz-opacity doesn't exist : 0.8 0.8 122 .withArrows a.open Property -khtml-opacity doesn't exist : 0.8 0.8 122 .withArrows a.open Property opacity doesn't exist in CSS level 2.1 but exists in : 0.8 0.8 127 * html .withArrows a.open:hover Parse Error opacity=80) 148 .jdGallery a.gallerySelectorBtn Property opacity doesn't exist in CSS level 2.1 but exists in : 0.4 0.4 149 .jdGallery a.gallerySelectorBtn Property -moz-opacity doesn't exist : 0.4 0.4 150 .jdGallery a.gallerySelectorBtn Property -khtml-opacity doesn't exist : 0.4 0.4 151 .jdGallery a.gallerySelectorBtn Parse Error opacity=40)

I think all errors are same. 我认为所有错误都是相同的。 The problem is only one opacity. 问题只是一种不透明性。

Please send me your inputs how to resolve these errors and get validate logo. 请给我您的意见,如何解决这些错误并获得验证徽标。

Thanks Rakesh Prajapati 感谢Rakesh Prajapati

The way to do opacity in IE < 9 is via the non-standard filter property (it uses a Direct X filter)...there's not much you can do here, if you want opacity in IE. 在IE <9中实现不透明的方法是通过非标准filter属性(它使用Direct X滤镜)...如果您想在IE中实现不透明,则可以在这里做很多。

If it helps, it's complaining about your properties that look like this: filter: alpha(opacity = 50); 如果有帮助,则说明您的属性看起来像这样: filter: alpha(opacity = 50); , the same for other non-standard opacity: properties. ,与其他非标准opacity:属性相同。

The fact of the matter is opacity wasn't standardized early enough...and to use it is hacky, it wont validate...either accept that it won't validate or remove it from all browsers that don't support the standard opacity: property, those are the two choices available. 问题的事实是不透明性还没有得到足够的早期标准化...使用它是很hacky的,它不会验证...要么接受它不会验证,要么将其从不支持该标准的所有浏览器中删除opacity:属性,这是两个可用的选择。

问题是-moz-opacity,-khtml-opacity在W3c验证程序上无效。删除它们并检查

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM