PNG Hack / Fix IE 6 jaoks CSS-trikid

Lang L: none (table-of-contents)

CSS-i taustpildide jaoks

.yourselector ( width:200px; height:100px; background: url(/folder/yourimage.png.webp) no-repeat; _background:none; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/folder/yourimage.png.webp',sizingMethod='crop'); )

Ei saa kasutada korduvalt, vajadused on fikseeritud ja kõrgus.

Siseste HTML-piltide jaoks

img, .png.webp ( position: relative; behavior: expression((this.runtimeStyle.behavior="none")&&(this.png.webpSet?this.png.webpSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png.webp')>-1?(this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')", this.src = "images/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''), this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')", this.runtimeStyle.backgroundImage = "none")),this.png.webpSet=true)); )

Selleks on vaja 1x1px läbipaistvat GIF-pilti

Huvitavad Artiklid...