开发者

Can opacity of images be considered to be well supported in almost all browsers?

开发者 https://www.devze.com 2023-02-04 17:57 出处:网络
There is a design where a button need to be made \"more invisible\", either by creating another image with brightness +192 or +212, or we can use CSS\'s opacity

There is a design where a button need to be made "more invisible", either by creating another image with brightness +192 or +212, or we can use CSS's opacity to simulate the same effect.

It seems that with the special situation of IE (6, 7, and 8+), the fol开发者_开发技巧lowing:

opacity:0.2; filter:alpha(opacity=20)

can make the opacity happen in almost all browsers, including IE 6? So really, there is no need to add one more image, but just using CSS is good enough?


According to this example you can do more. Especially for IE8:

/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

More info why MS did it this way in article Opacity rettuns to IE8

0

精彩评论

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

关注公众号