标签:style blog http ar color sp div log bs
1、渐变色
从上到下,白色透明度100%到白色透明度0%渐变(注意为避免继承,新建元素,父元素relative,子元素absolute)
background-image:linear-gradient(to bottom,rgba(255, 255, 255, 1),rgba(255, 255, 255, 0));//W3C background-image:-webkit-linear-gradient(to bottom, rgba(255, 255, 255, 1) , rgba(255, 255, 255, 0));//Webkit background-image:-moz-linear-gradient(top,rgba(255, 255, 255, 1),rgba(255, 255, 255, 0));//Gecko background-image:-o-linear-gradient(top,rgba(255, 255, 255, 1),rgba(255, 255, 255, 0));//Presto background-image:-ms-linear-gradient(top,rgba(255, 255, 255, 1),rgba(255, 255, 255, 0)); //IE,IE10+
参考链接:http://www.w3cplus.com/css3/new-css3-linear-gradient.html
2、透明
透明度(注意为避免继承,新建元素,父元素relative,子元素absolute)
opacity: 0.5; //W3C.firefox, Safari和 Opera.
filter:alpha(opacity=50); IE6+,取值为0-100.
-moz-opacity:0.5; //Mozilla老版本,0-1
-khtml-opacity: 0.5;//safari老版本,0-1
标签:style blog http ar color sp div log bs
原文地址:http://www.cnblogs.com/lllllllliangggggggg/p/4112504.html