开发者

CSS how to target background and make it transparent

I am using IE6 and the only occupicy thing i can thing that works is opacity: 0.5; filter: alpha(opacity = 50);

background-color:black;
     opacity: 0.5;
     filter: alpha(opacity = 50);

this works but it makes the text transparen开发者_开发问答t as well how can I make only the background colour transparent


it's simple only you have do is to give

background: rgba(0,0,0,0.5)

& for IE use this filter

{background: transparent;-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#7F000000,endColorstr=#7F000000)"; /* IE8 */    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#7F000000,endColorstr=#7F000000);   /* IE6 & 7 */      zoom: 1;}

for more about color transparency in IE you have to read about hsla color: http://greenevillage.net/csspages/hsla.aspx


You need to have a look at this trick here:

http://randaclay.com/tips-tools/how-to-make-your-backgrounds-transparent-using-css/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜