田 田

导航

css渐变色DIV

<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head>     <meta charset="utf-8" />     <title></title>     <style type="text/css">

.center{

width:100%;

height:600px;

FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#b8c4cb,endColorStr=red); /*IE 6 7 8*/

background: -ms-linear-gradient(top, #fff,  #0000ff);        /* IE 10 */

background:-moz-linear-gradient(top,#b8c4cb,#f6f6f8);/*火狐*/

background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#b8c4cb), to(#f6f6f8));/*谷歌*/

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#0000ff));      /* Safari 4-5, Chrome 1-9*/

background: -webkit-linear-gradient(top, #fff, #0000ff);   /*Safari5.1 Chrome 10+*/

background: -o-linear-gradient(top, #fff, #0000ff);  /*Opera 11.10+*/

}

</style> </head>

 

 <body>

<div class="center"></div>

 </body>

</html>

posted on 2015-07-11 11:36  田 田  阅读(269)  评论(0编辑  收藏  举报