开发者

CSS: So... opacity attribute is not working in Internet Explorer right?

开发者 https://www.devze.com 2023-01-02 18:41 出处:网络
I\'m using opacity:0.4 property on a <div> element in my page. I\'ve just realised now that it doesn\'t work in IE at all... the color of the background is completely opaque.

I'm using opacity:0.4 property on a <div> element in my page.

I've just realised now that it doesn't work in IE at all... the color of the background is completely opaque.

T开发者_Go百科hanks.


I use this set:

filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;

Not pretty, but it's cross-browser. IE uses the filter.


IE doesn't support opacity. You can use MS's alpha filter instead:

filter:alpha(opacity=40);

http://msdn.microsoft.com/en-us/library/ms532967%28VS.85%29.aspx

0

精彩评论

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