CSS背景渐变验证 [英] CSS background gradient validation

查看:179
本文介绍了CSS背景渐变验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站样式表中有许多CSS样式,它们使用以下或其变体:

I've got a number of CSS styles in my site's stylesheet that use the following, or variations of:

background: -webkit-gradient(
    linear,
    left bottom,
    left top,
    color-stop(0.0, #585858),
    color-stop(1.0, #ACACAC)
);
background: -moz-linear-gradient(
    center bottom,
    #585858 0%,
    #ACACAC 100%
);

我的问题是,当使用W3C验证器验证CSS时,我得到以下错误:

My problem is that when it comes to validating the CSS using the W3C Validator, I get the following error:


值错误:background -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858)颜色停止(1.0,#acacac))不是背景值:-webkit梯度(线性,左下,左上,颜色停止(0.0,#585858) webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac))

Value Error : background -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac)) is not a background value : -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac)) -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac))

据我所知,CSS是好的...这是验证器的问题,我应该让测试团队我工作与意识?

As far as I'm aware, the CSS is fine...is this a problem with the validator I should make the testing team I work with aware of?

推荐答案

您正在使用供应商特定的CSS属性的实验性实现。它们不是有效的CSS。

You are using vendor specific experimental implementations of CSS properties. They aren't valid CSS.

验证器的一个选项将允许您将报告中的供应商扩展从错误降级为警告(因此,如果您选择在生产站点上使用它们,您可以找到与使用非标准扩展无关的任何错误)。

One of the options for the validator will allow you to downgrade vendor extensions from errors to warnings in the reports (so if you are choosing to use them on a production site you can find any errors that aren't related to using non-standard extensions).

这篇关于CSS背景渐变验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆