ie7 png opacity. is it possible

2019-08-16 17:41发布

问题:

1) dont use ie8 with option "work as ie7". it lies in this case 2) use clean ie7 or ietester last version

For example test.png can be 50% tranparency jpeg picture. I know 2 methods to use it in ie7:

background-image: "test.png"; filter: alpha(opacity=70)

you will see gray image

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="test.png")
  alpha(opacity=70);
background: none;

you will see white image

2 variant came to us from ie6!

example: http://pastehtml.com/view/awfp66p2m.html 1 original. 2 grey background. 3 white progid

ie7 screenshot: http://clip2net.com/clip/m46295/1307529587-cliptj2620-2kb.png

ie6 screenshot: http://clip2net.com/clip/m46295/1307529630-cliptt2620-2kb.png

3 image works perfectly in ie6 and ie8. it means in ie6 and ie8 i can animate opacity using jquery!

回答1:

I'm not 100% sure what you mean, but I think this is a known bug in all versions of IE (at least up to 8, not sure about 9): Images with alpha transparency will not show correctly if the element containing them has an opacity value different from 100%.

See this answer for more details: How to make a Google Maps semi-transparent PNG tile layer work in IE8?



回答2:

I've found this one to be pretty helpful: http://labs.unitinteractive.com/unitpngfix.php