ie下面高版本的渐变又透明的才行。没法透明,可以考虑使用透明png。
rgba最后面的那个1可以改为0.8试试看,就变成透明的了。。
#box{width:200pxheight:200pxoverflow:hiddenposition: relative}#box span{
display: blockwidth:100%height:100%position: absolutetop:0left:0
background-image:linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)
background-image:-o-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)
background-image:-moz-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)
background-image:-webkit-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)
background-image:-ms-linear-gradient(bottom, rgba(0,0,0,1) 0%,rgba(255,255,255,1) 100%)
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#000000,endColorstr=#ffffff,grandientType=1)
}
<div id="box">
<img src="https://ss3.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/news/q=100/sign=2c88d7ac67d0f703e0b291dc38fb5148/3bf33a87e950352a60c7a4b35643fbf2b3118be3.jpg">
<span></span>
</div>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)