简体   繁体   English

值错误:背景图像底部不是颜色值)

[英]Value Error : background-image bottom is not a color value )

Can Some one can Help me to Rectify this Issue., I am Getting The Error as :Value Error : background-image bottom is not a color value ) 可以有人帮我解决此问题吗,我正在将错误显示为:Value错误:background-image bottom不是颜色值)

.btn {
    padding:5px 10px; border-radius:5px; color:#FFF; text-shadow: 1px 1px #333;
    box-shadow: inset 0 1px 0 0 #94bee0; border: none;
    background-image: linear-gradient(bottom, rgb(42,112,166) 21%, rgb(66,136,190) 61%);
    background-image: -o-linear-gradient(bottom, rgb(42,112,166) 21%, rgb(66,136,190) 61%);
    background-image: -moz-linear-gradient(bottom, rgb(42,112,166) 21%, rgb(66,136,190) 61%);
    background-image: -webkit-linear-gradient(bottom, rgb(42,112,166) 21%, rgb(66,136,190) 61%);
    background-image: -ms-linear-gradient(bottom, rgb(42,112,166) 21%, rgb(66,136,190) 61%);

    background-image: -webkit-gradient(
        linear,
        left bottom,
        left top,
        color-stop(0.21, rgb(42,112,166)),
        color-stop(0.61, rgb(66,136,190))
    );
}

Your unprefixed linear-gradient() syntax needs to be updated to match the latest spec , which has a different syntax for specifying the direction: 您需要更新无前缀的linear-gradient()语法以匹配最新的spec ,后者具有用于指定方向的不同语法:

background-image: linear-gradient(to top, rgb(42,112,166) 21%, rgb(66,136,190) 61%);

Note that to top does in fact replace bottom , even though it's the opposite direction. 请注意,尽管方向相反,但to top实际上会取代bottom See this answer for an explanation. 请参阅此答案以获取解释。

As for the prefixed values, don't worry about them: they are non-standard and therefore cannot be validated. 至于带前缀的值,请不要担心它们:它们是非标准的,因此无法验证。

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

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