<a target="_blank" href="http://www.cnblogs.com/kuikui/archive/2012/01/20/2327773.html">线性渐变(linear-gradient)</a>
现行渐变
首先看下示例
(1)垂直渐变

(2)垂直渐变
ie系列
filter: progid:dximagetransform.microsoft.gradient(startcolorstr='#ff0000',endcolorstr='#f9f900',gradienttype='0');
参数:startcolorstr起始颜色 endcolorstr结束颜色 gradienttype为0时代表垂直,为1时代表水平
firefox
background: -moz-linear-gradient(top, #ff0000, #f9f900);
参数:top、bottom垂直,left、right水平 例如:top时从顶部由#ff0000到#f9f900渐变,bottom时从底部由#ff0000到#f9f900渐变
opera
background: -o-linear-gradient(top,#ff0000, #f9f900);
webkit,如chrome、safari等
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ff0000), to(#f9f900));
参数:linear线性, x1 x2, x3 x4 x1与x3相同时垂直,x2与x4相同时水平 from起始颜色 to结束颜色
view
code