当前位置: 动力学知识库 > 问答 > 编程问答 >

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

问题描述:

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 following:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: