Foros del Web » Creando para Internet » Diseño web »

Maldito ie6 - ayuda con png

Estas en el tema de Maldito ie6 - ayuda con png en el foro de Diseño web en Foros del Web. LA VERDAD QUE ESTOY PODRIDO DE ESTO DE LA COMPATIBILIDAD, Y MAS AUN DE LOS QUE SIGUEN USANDO IE6, Q POR DESGRACIA LOS HAY. BUENO, ...
  #1 (permalink)  
Antiguo 10/10/2008, 15:37
 
Fecha de Ingreso: octubre-2008
Ubicación: Bs. As., ARG
Mensajes: 203
Antigüedad: 15 años, 6 meses
Puntos: 6
Maldito ie6 - ayuda con png

LA VERDAD QUE ESTOY PODRIDO DE ESTO DE LA COMPATIBILIDAD, Y MAS AUN DE LOS QUE SIGUEN USANDO IE6, Q POR DESGRACIA LOS HAY. BUENO, VAMOS AL PROBLEMA...EL TIPICO BUB DE LAS PNG, EN ESTE CASO FOTOS CON UN SOMBREADO...PERO DETRAS DE LA SOMBRA ME APARECE UN FONDO BLANCO. EL TEMA ES QUE RECURRI AL METODO DEL JAVASCRIPT PNGFIX.JS, DEL CUAL DICEN QUE FUNCIONA BIEN. EL TEMA ES QUE A MI NO. ADJUNTE EL SCRIPT EN LA CABEZERA Y SUBI EL ARCHIVO .JS AL HOST. POR FAVOR ESTO ES ALGO QUE SE USA HACE RATO, SEGURO ALGUIEN DEBE DE TENER UNA SOLUCION. LES ADJUNTO TANTO EL LLAMADO AL SCRIPT COMO EL CODIGO JS:


<!--[if lt IE 7.]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->
<!--[if IE]>



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.AlphaIma geLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
  #2 (permalink)  
Antiguo 10/10/2008, 16:26
Avatar de Mikmoro
Colaborador
 
Fecha de Ingreso: octubre-2006
Ubicación: K-pax
Mensajes: 7.228
Antigüedad: 17 años, 6 meses
Puntos: 280
Respuesta: Maldito ie6 - ayuda con png

A ver si este ejemplo te puede ayudar:

http://www.araudi.net/ejemplos/png_para_IE.html

Ese ejemplo usa el archivo iepngfix.htc

http://www.araudi.net/js/iepngfix.htc

Y por favor, no escribas en mayúsculas.
__________________
Visita mi nueva web idplus.org
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:01.