Foros del Web

Foros del Web (http://www.forosdelweb.com/)
-   CSS (http://www.forosdelweb.com/f53/)
-   -   PNG y CSS para IE (http://www.forosdelweb.com/f53/png-css-para-ie-379169/)

shakaran 17/03/2006 12:41

PNG y CSS para IE
 
Hola tengo varias imagenes en una web y me gusta ponerlas en PNG, porque dan mas calidad ocupando menos, pero claro si hago eso, las trasparencias y mucho de lo que tengo en CSS solo se ven bien en firefox...sabeis si hay algun script para que la gente que se meta desde el IE las vea bien? Gracias

fullmental 17/03/2006 13:24

si lo hay seguramente si usas el motor de busqueda de este mismo foro lo encontraras

busca png fix ie

aqui o en google.

sjam7 18/03/2006 16:06

Pon este script en tus paginas:

Código:

<!--[if gte IE 5.5000]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
  {
  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 + "\');\"></span>"
        img.outerHTML = strNewHTML
        i = i-1
        }
      }
  }
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->



La zona horaria es GMT -6. Ahora son las 05:49.

Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.