7. 渐变兼容性写法( 兼容到IE8+ )

code:
#div1{ 
  width: 200px; height: 200px; border: 1px solid #333;
  background: -moz-linear-gradient(top, red, yellow);
  background: -webkit-linear-gradient(top, red, yellow);
  background: -ms-linear-gradient(top, red, yellow); /* 支持IE10+ */
  background: linear-gradient(top, red, yellow);
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=red, endColorstr=yellow)";  /* 只支持IE8-9 */
  +background: #ff7a00;
}


移动端
#div1{ 
  width: 200px; height: 200px; border: 1px solid #333;
  background: -moz-linear-gradient(top, red, yellow);
  background: -webkit-linear-gradient(top, red, yellow);
}

 






 

posted @ 2015-10-17 22:51  Sampson1207  阅读(288)  评论(0编辑  收藏  举报