日期:2013-11-20  浏览次数:21155 次

网页制造aiyiweb文章简介:CSS3中绘制渐变背景.

火狐浏览器 :
-moz-linear-gradient(起始点, 其实颜色, [两头颜色 百分比], 结束颜色)。
起始点 :left top center bottom,可以组合。
颜色 : ragba,如果是transparent则为通明。
-moz-linear-gradient(center top, transparent, transparent 49%, rgba(2,37,58,0.5) 50%, rgba(63,111,135,0.5)); 中上开始。

chrome浏览器 :
-webkit-gradient(linear, center top, center bottom, from(transparent), color-stop(49%,transparent), color-stop(50%, rgba(2,37,58,0.5)), to(rgba(63,111,135,0.5)));

opera浏览器 :
-o-linear-gradient(top, transparent, transparent 49%, rgba(2,37,58,0.5) 50%, rgba(63,111,135,0.5));

百分比的写法 :起点y 起点x
-webkit-gradient(linear, 0% 100%, 100% 100%, from(#517384), color-stop(50%, #79a3b8), to(#517384));
-moz-linear-gradient(center left, rgba(81,115,132,0.55), rgba(121,163,184,0.55) 50%, rgba(81,115,132,0.55));