css background颜色的无效属性值

时间:2014-11-13 10:39:10

标签: html css

嗨,我对css很新,而且我遇到了颜色值错误的问题

article{
    float: left;
    width: 540px;
    height: 500px;
    margin: 10px;
    overflow: scroll;
    padding: 0 0 0 0;
    border: 1px solid #ddd;
    background: -webkit-gradient(linear, left top, left
    bottom, from(#94bae7), to(#FFF);
    background: -o-gradient(#94BAE7 , #FFF);
    background: -moz-linear-gradient(top, #94BAE7 0%, #FFF 100%);
}

2 个答案:

答案 0 :(得分:0)

这应该可行,顺便说一句:填充:0;与填充相同:0 0 0 0;

article {
    background: -webkit-linear-gradient(left top, #94bae7 , #FFF); 
    background: -o-linear-gradient(bottom right, #94bae7, #FFF); 
    background: -moz-linear-gradient(bottom right, #94bae7, #FFF); 
    background: linear-gradient(to bottom right, #94bae7 , #FFF);  
}

答案 1 :(得分:0)

一个小) - 关闭括号会在行背景中引起你的问题:-webkit-gradient。

background: -webkit-gradient(linear, left top, left bottom, from(#94bae7), to(#FFF));

之后(#FFF)使用另一个近距离括号。