Comments: The default IE6 does not display PNG-24 format pictures, we can through the following two good methods to achieve a simple display IE6, interested friends can refer to the nextMethod 1:
Add the following code after
Copy codeThe Code is as follows:
<! -- [If IE 6]>
<Script type = "text/javascript">
Function correctPNG ()
{
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.css Text
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 + "', sizingMethod = 'Scale'); \"> </span>"
Img. outerHTML = strNewHTML
I = I-1
}
}
}
CorrectPNG ();
</Script>
<! [Endif] -->
Method 2:
Copy codeThe Code is as follows:
<! -- [If IE 6]>
<Script src = "js/DD_belatedPNG_0.0.8a.js" type = "text/javascript"> </script>
<Script type = "text/javascript">
DD_belatedPNG.fix ('*');
</Script>
<! [Endif] -->