如果有人问过这个问题,请提前道歉:我找不到它,但我不太确定我使用的关键字。
无论如何!我正在尝试在图像上放置一条不透明的白色渐变线。这是我试图把它放在上面的东西:
div.horizontal
{
position: relative;
width: 100%;
height:45px;
}
div.horizontal ul
{
list-style-type:none;
margin:0;
padding:0;
}
div.horizontal li
{
float:left;
}
div.horizontal a
{
display:block;
width:312px;
height:35px;
background-image: url("../img/truefactzheader.png");
}
div.horizontal a:link,div.horizontal a:visited
{
font-weight:bold;
color:#FFFFFF;
text-align:center;
vertical-align:middle;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
div.horizontal a:hover,div.horizontal a:active
{
height:45px;
a:link {text-decoration:none;}
a:visited {text-decoration:none;}
}
渐变代码是这样的:
background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 51%, rgba(255,255,255,0.15) 52%, rgba(255,255,255,0) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(51%,rgba(255,255,255,0.15)), color-stop(52%,rgba(255,255,255,0.15)), color-stop(100%,rgba(255,255,255,0)));
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
background: -o-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
background: linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#00ffffff',GradientType=0 );
我如何让一个胜过另一个?
编辑:
我试过这个:
background: url("../img/truefactzheader.png"), -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,0.15) 51%, rgba(255,255,255,0.15) 52%, rgba(255,255,255,0) 100%);
background: url("../img/truefactzheader.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(51%,rgba(255,255,255,0.15)), color-stop(52%,rgba(255,255,255,0.15)), color-stop(100%,rgba(255,255,255,0)));
background: url("../img/truefactzheader.png"), -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
background: url("../img/truefactzheader.png"), -o-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
background: url("../img/truefactzheader.png"), -ms-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
background: url("../img/truefactzheader.png"), (linear-gradient(to bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,0.15) 51%,rgba(255,255,255,0.15) 52%,rgba(255,255,255,0) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#00ffffff',GradientType=0 );
但它仍然没有工作