DD_belatedPNG 图像在文档准备好后消失
我正在使用 DD_belatedPNG 来修复 IE6 中的透明 PNG;在某个时刻,我注意到所有固定的 PNG 在文档加载后一秒就开始消失。沿着这些思路:页面加载,1 秒过去,透明度变得可见,PNG 几乎立即消失。关于原因是什么以及如何解决的任何线索?谢谢!
更新:元素仍然存在,因此如果其中一个 PNG 是链接,它仍然可以单击。
<script src="/scripts/plugins/DD_belatedPNG_0.0.7a-min.js"></script>
<script>
PNG_selectors = ".bbb, #logo, #home_title, .home-image, ..........";
alert("PNGs are going to disappear now");
DD_belatedPNG.fix(PNG_selectors);
</script>
只要警报存在,它们就在那里,一旦单击“确定”,它们就会消失。
I'm using DD_belatedPNG to fix transparent PNGs in IE6; at a certain point I noticed that all fixed PNGs started disappearing a second after the document loaded. Something along these lines: page loads, 1 second passes, the transparency becomes viewable and the PNGs almost immediately disappear. Any clue on what the cause is and how to fix? Thanks!
UPDATE: the elements are still in place, so if one of the PNGs was a link, it is still clickable.
<script src="/scripts/plugins/DD_belatedPNG_0.0.7a-min.js"></script>
<script>
PNG_selectors = ".bbb, #logo, #home_title, .home-image, ..........";
alert("PNGs are going to disappear now");
DD_belatedPNG.fix(PNG_selectors);
</script>
As long as the alert is in place they are there, once OK is clicked, they are gone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于那些感兴趣的人,这是由于脚本从 fonts.com 加载内容引起的...我将其设置为延迟,它解决了问题。甜的!
For those who are interested, this was being caused by as script loading stuff from fonts.com... I set it to defer, and it fixed the issue. Sweet!
您能否尝试仅在页面加载完成后调用
DD_belatedPNG.fix()
,然后看看问题是否消失?将事件处理程序附加到window.onload
,如下所示:Can you try calling
DD_belatedPNG.fix()
only when the page has finished loading, then see if the problem goes away? Attach an event handler towindow.onload
like so: