http://jsfiddle.net/ZMfBv/

hr {
border: 0;
border-color:blue;
background-color:blue;
color:blue;
height: 4px;
background:#fff;
background: -webkit-gradient(linear, left top, right top, color-stop(0%,hsla(0,0%,0%,0)), color-stop(50%,hsla(0,0%,0%,.75)), color-stop(100%,hsla(0,0%,0%,0)));
background: -webkit-linear-gradient(left, hsla(0,0%,0%,.75) 10%, hsla(0,0%,0%,0) 100%);
background:    -moz-linear-gradient(left,  hsla(0,0%,0%,.75) 10%, hsla(0,0%,0%,0) 100%);
background:     -ms-linear-gradient(left,  hsla(0,0%,0%,.75) 10%, hsla(0,0%,0%,0) 100%);
background:      -o-linear-gradient(left,  hsla(0,0%,0%,.75) 10%, hsla(0,0%,0%,0) 100%);
background:         linear-gradient(left,  hsla(0,0%,0%,.75) 10%, hsla(0,0%,0%,0) 100%);
}


我希望将hr的颜色更改为蓝色。很明显,颜色,背景颜色设置不起作用,该怎么办?

最佳答案

更新:这是黑色背景,白色至灰色渐变hr

body {background-color: black;}


hr {
    height: 4px;
    border: 0;
    background: -webkit-linear-gradient(left, #f3ffff, #555555);
    background: -moz-linear-gradient(left,#f3ffff,  #555555);
    background: -o-linear-gradient(left, #f3ffff,  #555555);
    background: linear-gradient(left, #f3ffff,  #555555);
}

07-25 20:59