#woodwhite{position:absolute;left:1000px;width:345px;height:1400;top:0px;z-index:10;
background:-webkit-linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
background:-o-linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
background:-moz-linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
background:linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));"}
我从w3获得的这些渐变代码并不适用于所有浏览器。 任何帮助,将不胜感激。 :)
答案 0 :(得分:1)
看到这可能对你有所帮助
.grad {
background-color: #F07575; /* fallback color if gradients are not supported */
background: -webkit-linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
/* For Chrome and Safari */
background: -moz-linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
/* For old Fx (3.6 to 15) */
background: -ms-linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
/* For pre-releases of IE 10*/
background:-o-linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
/* For old Opera (11.1 to 12.0) */
background:linear-gradient(-90deg, rgba(255,255,255,0),rgba(255,255,255,1));
/* Standard syntax; must be last */
}
答案 1 :(得分:1)
background: #999; /* for non-css3 browsers */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#ccc), to(#000)); /* for webkit browsers */
background: -moz-linear-gradient(top, #ccc, #000); /* for firefox 3.6+ */