stay IE6 Of the next PNG picture transparent The area is always dark. In fact, for IE6, PNG8 images will not appear this way, but the effect is the same as that of GIF. PNG32 can display transparently and perfectly. How to solve this headache, please see me explain to you one by one.
Method 1:
Add the following code between the<head></head>of the web page:
<!--[if lte IE 6]>
<script type="text/javascript" src= https://www.toyean.com/upload/transparent.js ></script>
<script>
DD_belatedPNG.fix(".menu,.menu li a:hover,#nav UL LI.current A");
</script>
<![endif]-->
Description: DD_belatedPNG.fix (". menu,. menu li a: over, # nav UL LI. current A"); The style in parentheses is the style with PNG pictures. Multiple styles are connected by commas, and no comma is allowed after the last style, otherwise it will become invalid.
Method 2:
IE css filter has a filter that makes the png background transparent. The JavaScript method also uses this filter to make the png background transparent.
Write: filter: progid: DXImageTransform Microsoft.AlphaImageLoader(src=’ https://www.toyean.com/upload/transparent.png ’);
Usage example:
.png{background:url(’ https://www.toyean.com/upload/transparent.png ’);}
* html .png {_background:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=’ https://www.toyean.com/upload/transparent.png ’);}