图像未加载到Chrome的Codepen上吗?

时间:2018-07-18 04:49:43

标签: html css codepen

当我为图像使用本地存储时,图像在Firefox和chrome上工作,但是当我将图像上传到imgur并将其加载到Codepen中时-只能在Firefox上运行,图像根本无法加载chrome,为什么会这样?

<img src="https://i.imgur.com/OBiyZL0.jpg" alt="Blog Thumbnail">
background: url('https://i.imgur.com/6RELfrW.jpg') no-repeat;

这是我的操作方式,CSS用于与所示html不同的元素,但不适用于codepen / chrome。

此外,Chrome浏览器上的导航栏无法正常工作,为什么justify-content:right;不行?

有问题的密码笔:https://codepen.io/anon/pen/RBRJEN

1 个答案:

答案 0 :(得分:0)

Imgur图片显示403 error。可以尝试一些在线图像服务,例如https://imgbb.com/,而不要使用imgur。它将起作用。

我使用的图片链接为https://ibb.co/cDR14J

.splashCover {
  margin-top: 0;
  height: 200px;
  background: url('https://ibb.co/cDR14J') no-repeat;
  display: flex;
  justify-content: center;
  text-align: center;
  align-items: top;
  filter: opacity(.6);
}

下面是工作代码笔:

https://codepen.io/anon/pen/EpyRMO

相关问题