Usando png em ie5.5 ou IE6 Fóruns : Usando png em ie5.5 ou IE6
Usando png em ie5.5 ou IE6 Richard Williams - 07-02-2009
Achei isso no permitindo Windows isto é, 5.5 e IE 6.
Adicione o seguinte java script como uma página à sua pasta raiz.
/*
Correctly handle PNG transparency in Win IE 5.5 & 6.
http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.
Use in <HEAD> with DEFER keyword wrapped in conditional comments:
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
*/
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
if ((version >= 5.5) && (document.body.filters))
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style="" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src='" + img.src + "', sizingMethod='scale');"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
Copie esta na cabeça do seu html
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
Richard Williams
Re: Usando png em ie5.5 ou IE6 Fernando Mol - 07-04-2009
Nice post, Richard. Pergunto-me se este tipo de coisas pode ser adicionado ao FAQ.
Re: Usando png em ie5.5 ou IE6 Richard Williams - 07-04-2009
Que pode fazer, Mas eu não tenho testado isso sozinho, Tão à espera de alguém para comentar se funciona primeiro...
Richard Williams
Re: Usando png em ie5.5 ou IE6 Kristen Dormaier - 07-07-2009
Eu não poderia começá-lo a trabalhar. Embora eu não tenha obtido qualquer png corrige a trabalhar para ie5.5 ou IE6. Eu vou continuar tentando...
Kristen
Re: Usando png em ie5.5 ou IE6 Richard Williams - 07-07-2009
Oi Kristen,
Você pode partilhar o seu código aqui para nos dar uma olhada por favor...?
Obrigado
Richard Williams
Re: Usando png em ie5.5 ou IE6 Kira Woodmansee - 07-16-2009
Wow, Thanks for posting que! Eu apenas sobre desistiu de pngs quando eu olhasse no IE.
Kira woodmansee
Evento coordenador, Boulder artes digitais
Eventos @ Boulderdigitalarts.com
http://www.Boulderdigitalarts.com