线性渐变适用于除 IE8 之外的所有浏览器。
我补充说progid:DXImageTransform.Microsoft.gradient
......这确实给了它一些渐变,但预期的结果是不同的。
代码:-
div{
height:500px;width:500px;
background-size: 50px 50px;
background-color: #DDEEEE;
background-image: -webkit-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: -moz-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: -ms-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: -o-linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
background-image: linear-gradient(rgba(255, 255, 255, .2) 50%, transparent 50%, transparent);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#DDEEEE',GradientType=0 );}
如何使这个渐变线性?