开发者

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜