gpt4 book ai didi

CSS3 验证器在渐变代码上显示 5 错误

转载 作者:行者123 更新时间:2023-12-04 22:02:06 26 4
gpt4 key购买 nike

当我尝试通过 CSS3 W3.org Validator 验证我的 Gradient css 时,它显示错误

对不起!我们发现了以下错误(5)

我的代码是

background: linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%);

错误 http://www.freeimagehosting.net/uy82i

最佳答案

那么Rizwan,首先你正在使用的网站http://jigsaw.w3.org/css-validator/#validate_by_input不完全支持 CSS3。

发件人:About the CSS Validator

So, this is the authority on what is correct CSS and what isn't?

No. It is a helpful and reliable tool, but a software tool, and like every software, it has some bugs and issues. The actual reference on Cascading Style Sheets are the CSS Specifications.

By default, this validator checks style sheets against the grammar, properties and values defined in the CSS 2.1 specification, but other CSS profiles can be checked against by using the options.



如果您查看 bugs and issues您会发现以下错误: linear-gradient as a background-image ,它不识别线性梯度。

-webkit-gradient 是特定于浏览器的,w3.org 验证器将无法识别它。

最后的建议,不要过分依赖验证器,它们可能会帮助您发现错误,但它们并非 100% 正确。对于 CSS3,最好在浏览器中测试这些属性并查看它们是否正常工作。

关于CSS3 验证器在渐变代码上显示 5 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10545622/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com