div渐变背景色

.linear{
  width:400px;
  height:400px;
  FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0, startColorStr=#b8c4cb, endColorStr=red);
/*IE 6 7 8*/ background: -ms-linear-gradient(top, #033360, #006495);/* IE 10 */ background: -moz-linear-gradient(top, #033360, #006495);/*火狐*/ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#033360), to(#006495));/*谷歌*/ background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#033360), to(#006495));/* Safari 4-5, Chrome 1-9*/ background: -webkit-linear-gradient(top, #033360, #006495);/*Safari5.1 Chrome 10+*/ background: -o-linear-gradient(top, #033360, #006495);/*Opera 11.10+*/
<div class="linear"></div>

猜你喜欢

转载自www.cnblogs.com/wangshuaicxy/p/12624669.html