CSS2 渐变验证错误
以下是我的 CSS 代码:
table th{ font-family:arial; font-size:9pt; color:#ffffff; background: -moz-linear-gradient(#b9cdde, #7c98ae); border: 1px solid #ffffff; }
table th:last-child{ background: -moz-linear-gradient(#729cc3, #35699a); }
我收到 CSS 验证错误,其中显示
值错误:背景太多值或无法识别的值:-moz-线性梯度(#b9cdde,#7c98ae)-moz-线性梯度(#b9cdde,#7c98ae)
有人知道为什么会这样吗?发生?
The following is my CSS code:
table th{ font-family:arial; font-size:9pt; color:#ffffff; background: -moz-linear-gradient(#b9cdde, #7c98ae); border: 1px solid #ffffff; }
table th:last-child{ background: -moz-linear-gradient(#729cc3, #35699a); }
I get a validation error with CSS which says
Value Error : background Too many values or values are not recognized : -moz-linear-gradient(#b9cdde,#7c98ae) -moz-linear-gradient(#b9cdde,#7c98ae)
Does someone have any idea as to why this might be happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
特定于供应商的选择器(例如
-moz-linear-gradient
)不是官方 CSS2 规范的一部分,因此当验证器找到 then 时,它会抛出错误。就我个人而言,我不介意这样的东西是否无法验证——它只是一个漂亮、清晰的渐变。Vendor-specific selectors such as
-moz-linear-gradient
are not part of the official CSS2 specification, so when the validator finds then, it will throw an error. Personally, I don't mind if stuff like this doesn't validate - it's only a nice, cleanly written gradient.