The tutorial of helper home (www.bkjia.com) has been engaged in web page design for many years. Every time you encounter a problem, you will waste a lot of time searching for special effect code of JavaScript (java script, therefore, every lazy hacker will save the JS special effect code for each problem for later use. The lazy hacker shares all the JS special effect codes accumulated over the years, hoping to save some time for everyone. If you have any questions, leave a message to discuss them. This time, the Javascript special effect code to be shared by the lazy hacker is the JS special effect code for the transparent effect of PNG images in IE6.
When looking for the JS special effect code for PNG images with transparent effects, the lazy hacker found that most of the effects can only be transparent under IE6. When PNG images are used as the background, this effect does not work. Next, I want to share the JS special effect code to achieve this effect.
The JS special effect code of PNG Image transparency under IE6 uses behavior technology, and it does not matter if the Code does not understand it. We just need to use it.
Of course, this JS special effect code is only the core code. For all the code, please click the download link at the bottom of the article to download the PNG Image transparency effect under IE6. The following will show you how to use it, the procedure can be simplified to the following three steps:
• Step 1: Upload the beibeibeiiepngfix.htc?and shanghaiyun.gif files to your project
• Step 2: Use the appropriate selector to enable "behavior: url (" iepngfix. htc ")" on a PNG image that is transparent to IE6 or a container that requires transparent background image ");"
• Step 3: If you want the background png image of the container to have a transparent effect, you also need to introduce the iepngfix_tilebg.js script in the page (of course, if you do not want to use the transparent png background image effect of the container, you can also disable this js file)
Of course, the entire solution also has disadvantages-one or two files need to be referenced (iepngfix. htc and iepngfix_tilebg.js files ). I have referenced these two files in the project and found that the opening speed is much slower. It may also be related to the code of the project or other software and hardware. However, removing the iepngfix_tilebg.js file does not have much impact, therefore, if it is not necessary to reference this file as far as possible, it depends on your own requirements.
Attachment download >>>