【问题标题】:Image not showing and inspect element shows size 1x1 pixels图像未显示,检查元素显示大小为 1x1 像素
【发布时间】:2014-12-28 16:07:21
【问题描述】:

我有两个由图像组成的相似页面,但是在其中一个页面上没有加载图片,当我检查元素时,它显示大小为 1x1 的空白白色。但是,如果我单击图像的链接,它会将图像加载到新选项卡上,没有问题..

Working page

Not working page

这些页面几乎只有 HTML/CSS 和很少的 jQuery。 我没有使用任何广告拦截器..

我的代码-

<div id="content" style="text-align:center; margin-bottom:120px;">
<div id="floating-arrow"><img src="images/arrow.png" alt="meme global publishers" /></div>

    <img src="images/advertisers/1.jpg" style="width:100%; height:1024px;" />
    <img src="images/advertisers/2.jpg" style="width:100%; height:1024px;" />
    <img src="images/advertisers/3.jpg" style="width:100%; height:1024px;" />
    <img src="images/advertisers/4.jpg" style="width:100%; height:1024px;" />
    <img src="images/advertisers/5.jpg" style="width:100%; height:1024px;" />
    <img src="images/advertisers/6.jpg" style="width:100%; height:1024px;" />
    <img src="images/advertisers/7.jpg" style="width:100%; height:1024px;" />
</div>

为什么会这样?请问如何解决这个问题?

【问题讨论】:

  • 第二个链接对我有用..

标签: html css image


【解决方案1】:

这个问题是由 Chrome 上的广告拦截器引起的。错误:

Failed to load resource: net::
http://meme.netsol.co.il/images/advertisers/4.jpg Failed to load resource: net::ERR_BLOCKED_BY_CLIENT

您可以通过重命名文件名/路径来解决此问题。

【讨论】:

  • 我知道问题出在文件夹的名称“广告商”上,对吗?感谢您的帮助,现在可以使用了! :)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-02-13
  • 2015-01-30
  • 1970-01-01
  • 2017-11-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多