Method One: Use PNG map as background
Pay attention to hack.
HTML code
The code is as follows |
Copy Code |
<div class= "logo" ><a href= "/" >logo</a></div> |
CSS Code
The code is as follows |
Copy Code |
. logo {width:338px; height:57px; float:left background:url (/images/logo.png) 0px 0px no-repeat!important; text-inden T: -1000px; _background-image:none; Filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src= '/images/logo.png ', senabled= ' true ', sizingmethod= ' Scale '); } |
Method Two: Insert PNG picture, define img
This method is to prepare a completely transparent picture transparent.gif, the size is random.
HTML code
The code is as follows |
Copy Code |
<div class= "logo" ><a href= "/" ></a></div> CSS Code . logo {width:338px; height:57px; float:left; } . logo img {width:338px; height:57px;} /* PNG transparent compatible IE6 * * . logo img { Azimuth:expression ( This.pngset? This.pngset = true: (This.nodename = = "IMG" && this.src.toLowerCase (). IndexOf ('. png ') >-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.pngset=true ); } |