1、IE8\IE9中的代码如下
-ms-background:filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=red(开始颜色),endColorstr=blue;(结束颜色) )";
2、其他现代浏览器的css3渐变代码:background:linear-gradient(top,red,blue);
但是得加前缀,-webkit–moz–ms-
-o-以及为日后考虑不加前缀的。
top:代表从上部开始执行渐变,可以选择left top:左上角
等等
red:渐变开始的颜色
blue:渐变结束的颜色。
3、IE6\IE7只能使用单一的色块,没有办法使用渐变颜色
单独设置为`+background:(某种颜色)`