Posted By

lixonic on 09/04/10


Tagged

css png


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

lixonic
jplr


IE Png Fix


 / Published in: CSS
 

  1. #[name]{
  2.  
  3.  
  4. behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
  5. this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')",
  6. this.src = "transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
  7. this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')",
  8. this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
  9. );
  10.  
  11. }

Report this snippet  

You need to login to post a comment.