码迷,mamicode.com
首页 > Web开发 > 详细

css3---线性渐变

时间:2017-04-11 16:58:00      阅读:256      评论:0      收藏:0      [点我收藏+]

标签:targe   blog   sites   css   http   efault   otto   web   style   

.example1 {
       width: 150px;
       height: 80px;
       background: -moz-linear-gradient( top,#ccc,#000);
       background: -o-linear-gradient( top,#ccc,#000);
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#ccc, endColorstr=#000);//ie

-ms-filter:"progid:DXImageTransform.Microsoft.gradient (GradientType=0,startColorstr=#ccc,endColorstr=#000)";

}

效果如下:

 

  技术分享

技术分享

 

 老式写法

background: -webkit-gradient(linear,center top,center bottom,from(#ccc), to(#000));

参考:http://www.cnblogs.com/lhb25/archive/2013/01/30/css3-linear-gradient.html

css3---线性渐变

标签:targe   blog   sites   css   http   efault   otto   web   style   

原文地址:http://www.cnblogs.com/zhaixr/p/6693933.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!