这是我的代码,尽管 Firefox 由于某种原因向每个代码添加了奇怪的类:
<img id="share_facebook" class="gknwrycuvfcesykaisun" src="http://localhost:80/graphics/share/facebook.png"></img>
<img id="share_google" src="http:/localhost:80/graphics/share/google.png"></img>
<img id="share_pinterest" class="gknwrycuvfcesykaisun" src="http://localhost:80/graphics/share/pinterest.png"></img>
<img id="share_tumblr" class="gknwrycuvfcesykaisun" src="http://localhost:80/graphics/share/tumblr.png"></img>
<img id="share_twitter" class="gknwrycuvfcesykaisun" src="http://localhost:80/graphics/share/twitter.png"></img>
<img id="share_email" src="http://localhost:80//graphics/share/email.png"></img>
在 Chrome 中,这可以按预期工作,但在 Firefox 中,图像根本不显示。当我使用文档检查器单击它们时,屏幕左上角会显示一个灰色信息框,表明图像位于文档外部或屏幕外等。
这些没有特殊的样式,我什至尝试将它们移到我页面的所有内容之外,并将它们放在 BODY 标签的正下方,并删除 Firefox 添加的奇怪的额外类值,但充其量显示 Google 和电子邮件图像,其他均不显示。
将鼠标悬停在检查器中的图像源地址上会显示 Google 和电子邮件的弹出图像,其余部分显示“无法加载图像”。如果我剪切并粘贴该值并将其加载到新选项卡中,我可以很好地看到图像。
我清除了每个类别的“所有时间”缓存,但仍然没有任何结果。这是怎么回事!?
最佳答案
对于像我一样遇到这个问题的人来说,它是 answered here .
简短的回答是:Adblock。
关于css - 图像在 Firefox 中消失在屏幕外,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22892941/