【问题标题】:images does not display in chrome and firefox图像在 chrome 和 firefox 中不显示
【发布时间】:2017-07-09 14:06:48
【问题描述】:

图像不会在 Firefox 和 chrome 中显示。 Safari 工作正常。我将图像编码为 CSS 中的背景图像,并将图像编码为 HTML。当我预览页面时,图像只能在 safari 中看到。为什么?这发生在我买了一台新电脑时。

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
</head>
<body>
<img src="img/background.png" alt="">
</body>
</html>

【问题讨论】:

  • 显示你迄今为止在代码中尝试过的内容

标签: html css google-chrome firefox safari


【解决方案1】:

我发现了为什么图像没有在 Firefox 和 chrome 中显示。图像本身出现错误。我发现当我尝试将图像导入 Photoshop 时,photoshopped 有一条错误消息说“无法放置“background.png”,因为文件格式模块无法解析文件。”所以我在 html 中制作了一个新图像,并将图像显示在浏览器上。

【讨论】:

    猜你喜欢
    • 2015-12-17
    • 1970-01-01
    • 2016-06-08
    • 1970-01-01
    • 2018-11-13
    • 2021-12-24
    • 1970-01-01
    • 2012-07-08
    • 1970-01-01
    相关资源
    最近更新 更多