Home >Web Front-end >HTML Tutorial >DD_belatedPNG.js makes PNG images disappear_html/css_WEB-ITnose
DD_belatedPNG.js
After quoting DD_belatedPNG.js, the PNG image disappears under IE6, please solve it. . . After changing the comment writing method of IE6, the picture can be displayed (with a transparent effect), but the comment characters of IE6 will also be displayed on the web page, such as: 32bf6dd8d9e9c69afb95af0b0e5e6991...d91fd4e7638da561dd14a1d1730ed3b9
<!--[if IE 6]><script src="pngfix.min.js"></script><script> // CSS selector DD_belatedPNG.fix("#a"); // DOM DD_belatedPNG.fixPng(document.getElementsByTagName('img')[1]); </script><![endif]-->
XML/HTML code
?
1234567891011
32bf6dd8d9e9c69afb95af0b0e5e6991 19ae3d66f85a75a3be62b1758ce860d52cacc6d41bbb37262a98f745aa00fbf0 3f1c4e4b6b16bbbd69b2ee476dc4f83a // CSS selector DD_belatedPNG .fix("#a"); // DOM DD_belatedPNG.fixPng(docume...
The PNG image is displayed according to your writing method, but it is still gray and has no transparency...
Code:
32bf6dd8d9e9c69afb95af0b0e5e6991
aeb17b76306cd4304f82aedeae6af67d
3f1c4e4b6b16bbbd69b2ee476dc4f83a
// CSS selector
DD_belatedPNG.fix(".logo");
// DOM
DD_belatedPNG.fixPng ( document.getElementsByTagName('img')[1]);
2cacc6d41bbb37262a98f745aa00fbf0
1b771f47d72d900ba74308aee59557f0
Please give me some advice Solution
dd sometimes makes the picture disappear. This is because dd will dynamically add a position:relative element outside the dom element. Therefore, if your element uses position;absolute or other absolute For positioning, please add a position:relative; or use IE's filter to solve this problem.
Regarding PNG transparency, LZ can read the following article: http:/ /www.cnblogs.com/yjzhu/archive/2012/11/09/2762059.html
7f8b592f2035051ab8faf84c2f04f4af2cacc6d41bbb37262a98f745aa00fbf0
537da28fd0b046eef482e1c533b02b47 1b771f47d72d900ba74308aee59557f0
PNG.JS
DD_belatedPNG.fix('.logo_img,...');
Still not solving the problem. .
Link address: http://www.cnblogs.com/yjzhu/archive/2012/11/09/2762059.html
Well, I have read this article, and now I just want to use DD_belatedPNG .fix to solve PNGo transparency. Because there was no problem using this method before, but now it can’t be used, which is very confusing. . .
Quoting the reply from jikeytang on the 4th floor: dd sometimes makes the picture disappear. This is because dd will be in A position: relative element is dynamically added outside the DOM element. Therefore, if your element uses position; absolute or other absolute positioning, please add a position: relative; outside the element or use IE filters to solve this problem.
Still not solving the problem. .
http://www.cnblogs.com/jikey/archive/2013/03/13/2957168.html
Try the method here and see if it works