实现代码:
代码如下:
<!doctype html public -//w3c//dtd xhtml 1.0 transitional//en http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd>
<html>
<head>
<title></title>
<style type=text/css>
.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 */
}
</style>
</head>
<body>
<div class=linear></div>
</body>
</html>