【问题标题】:CSS Opacity error in W3C ValidatorW3C 验证器中的 CSS 不透明度错误
【发布时间】:2010-12-08 17:15:21
【问题描述】:

我的网站需要 W3C CSS Validator 徽标。由于一些错误,我没有得到它。 我需要你的帮助才能得到他们的标志。 这是 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)

我认为所有的错误都是一样的。问题只有一个不透明度。

请将您的输入发送给我如何解决这些错误并获得验证徽标。

谢谢 拉克什·帕贾帕蒂

【问题讨论】:

    标签: javascript css


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      在 IE filter 属性(它使用 Direct X 过滤器)...如果你想在 IE 中实现不透明度,你可以在这里做的不多。

      如果有帮助,它会抱怨您的属性看起来像这样:filter: alpha(opacity = 50);,其他非标准 opacity: 属性也是如此。

      事实是不透明度没有足够早地标准化......并且使用它是hacky,它不会验证......要么接受它不会验证,要么从所有不验证的浏览器中删除它支持标准的opacity: 属性,这是两个可用的选择。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-09-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多