实现代码:
代码如下:
.linear{
width:100%;
height:600px;
filter: progid:dximagetransform.microsoft.gradient(gradienttype=0,startcolorstr=##15a216,endcolorstr=#fafafa); /*ie*/
background:-moz-linear-gradient(top,#15a216,#fafafa);/*火狐*/
background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#15a216), to(#fafafa));/*谷歌*/
background-image: -webkit-gradient(linear,left bottom,left top,color-start(0, #15a216),color-stop(1, #fafafa));/* safari & chrome*/
filter: progid:dximagetransform.microsoft.gradient(gradienttype=0,startcolorstr='#15a216', endcolorstr='#fafafa'); /*ie6 & ie7*/
-ms-filter: progid:dximagetransform.microsoft.gradient(gradienttype=0,startcolorstr='#15a216', endcolorstr='#fafafa'); /* ie8 */
}