Saturday, October 8, 2011

CSS: Support for transparent PNG in Internet Explorer

Versions prior to Internet Explorer 7 has limited support for transparent PNGs. To enable transparent PNGs in IE 6 you should use the following statement in your CSS:

<!--[if lt IE 7]>
<style type='text/css'>

 .some_class {
        background:none;
        filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/x.png', sizingMethod='scale');
 }

</style>
<![endif]-->


Opacity Bug in IE
If you specify the opacity (transparency) for a already transparent PNG in IE 7 and 8, the transparent area will turn totally black. If you use a transparent PNG together with f. example jQuery plug-ins, make sure that the opacity/filter is set to 255 (no transparency).
Olá! Se você ainda não assinou, assine nosso RSS feed e receba nossas atualizações por email, ou siga nos no Twitter.
Nome: Email:

0 kommentarer:

Post a Comment