CSS3, how to make my Gradient WebKit Background Transparent?
I have the following line of CSS:
background: -webkit-gradient(linear, left top, left bottom, from(#243d63), to(#1a2638));
How can I make the background 开发者_运维百科transparent, ie an opacity of .9, so the user can see what's under the div that has this style? Just for WebKit only concern...
Thanks
Use rgba
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255,52,21,0.2)), to(#000), color-stop(.6,#000));
rgba syntax is as so: rgba(redInDecimal,greenInDecimal,blueInDecimal,alphaFrom0To1);
http://jsfiddle.net/PxnXn/1/
精彩评论