DD_belatedPNG 图像在文档准备好后消失

发布于 2024-10-01 04:10:17 字数 515 浏览 2 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

狼亦尘 2024-10-08 04:10:17

对于那些感兴趣的人,这是由于脚本从 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!

萌︼了一个春 2024-10-08 04:10:17

您能否尝试仅在页面加载完成后调用 DD_belatedPNG.fix(),然后看看问题是否消失?将事件处理程序附加到 window.onload,如下所示:

<script>
window.onload = function() {
    var PNG_selectors = ".bbb, #logo, #home_title, .home-image, ..........";
    alert("PNGs are going to disappear now");
    DD_belatedPNG.fix(PNG_selectors);
};
</script>

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 to window.onload like so:

<script>
window.onload = function() {
    var PNG_selectors = ".bbb, #logo, #home_title, .home-image, ..........";
    alert("PNGs are going to disappear now");
    DD_belatedPNG.fix(PNG_selectors);
};
</script>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文