Html 图像不会显示在chrome和firefox中

Html 图像不会显示在chrome和firefox中,html,css,google-chrome,firefox,safari,Html,Css,Google Chrome,Firefox,Safari,图像不会显示在firefox和chrome中。Safari很好用。我将图像编码为CSS中的背景图像,并将图像编码为HTML。当我预览页面时,图像只能在safari中看到。为什么?这发生在我买了一台新电脑的时候 <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Untitled Document</title> </head> <body&

图像不会显示在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>

无标题文件

我找到了firefox和chrome中没有显示图像的原因。图像本身出现了错误。我发现当我尝试将图像导入photoshop时,photoshopped有一条错误消息,说“无法放置”background.png,“因为文件格式模块无法解析该文件。”因此我在html中创建了一个新图像,并在浏览器上显示该图像

显示迄今为止您在代码中尝试的内容