1. Use js files to make IE support png images transparent.
Pngfix. js:
Copy codeThe Code is as follows: var arVersion = navigator. appVersion. split ("MSIE ")
Var version = parseFloat (arVersion [1])
Function fixPNG (myImage)
{
If (version> = 5.5) & (version <7) & (document. body. filters ))
{
Var imgID = (myImage. id )? "Id = '" + myImage. id + "'":""
Var imgClass = (myImage. className )? "Class = '" + myImage. className + "'":""
Var imgTitle = (myImage. title )?
"Title = '" + myImage. title + "'": "title = '" + myImage. alt + "'"
Var imgStyle = "display: inline-block;" + myImage.style.css Text
Var strNewHTML = "<span" + imgID + imgClass + imgTitle
+ "Style = \" "+" width: "+ myImage. width
+ "Px; height:" + myImage. height
+ "Px;" + imgStyle + ";"
+ "Filter: progid: DXImageTransform. Microsoft. AlphaImageLoader"
+ "(Src = \ '" + myImage. src + "\', sizingMethod = 'Scale'); \"> </span>"
MyImage. outerHTML = strNewHTML
}
}
Usage:
In the template's <HEAD>
<! -- [If lt IE 7]>
<Script defer type = "text/javascript" src = "pngfix. js"> </script>
<! [Endif] -->
Height and width cannot be removed. Method from autoit, detailed description can look at the original http://homepage.ntlworld.com/bobosola/index.htm
2. The vb program uses png images for startup pictures. Here is a class for reading png images in vb, one of my previous programs used this class to implement the PNG transparent effect startup screen.
Resources in the attachment are downloaded from the pillow object.