1、Firefox
background:-moz-linear-gradient(top, red, red 50%,red,yellow 50%,yellow,yellow);
2、Chrome、Safari
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.50, #ff0), color-stop(0.50, rgb(255, 0, 0)));
3、IE
filter:alpha(opacity=100 finishopacity=0 style=1 startx=0,starty=50,finishx=0,finishy=70) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);
-ms-filter:alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);/*IE8*/
说明:startx,finishx等用的是百分比,但是不能带%(IE就是矫情)
4、Opera
background:-o-linear-gradient(top,red 20%,yellow 50%,green 80%);
说明:具体怎么用不太清楚,这里有介绍:http://dev.opera.com/articles/view/css3-linear-gradients/