In IE and VB to support PNG image transparency effect of the implementation method (VB source packaging) _javascript skills

Source: Internet
Author: User
1, use JS file to enable IE to support PNG image transparency effect.
Pngfix.js:
Copy Code code 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.cssText
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
}
}

How to use:
In the <HEAD> of the template
<!--[If Lt IE 7]>
<script defer type= "Text/javascript" src= "Pngfix.js" ></script>
<! [endif]-->


High and wide cannot be removed. Method from AutoIt, detailed description can look at the original http://homepage.ntlworld.com/bobosola/index.htm

The 2,VB program uses PNG picture, does the splash screen to be quite helpful, here has a VB to read the PNG picture class, my previous program is also uses this class to implement the PNG transparency effect launch screen.
Attached resources from pillow home file download

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.