图片未加载,404

时间:2019-06-27 09:50:01

标签: html

enter image description here从浏览器查看时,图像文件未加载并显示404

我正在使用AWS并运行docker容器,基本映像为ubuntu并已安装apache2。我在var / www / html中有一个图像文件夹和index.html,在对代码进行容器化之后,该图像未显示

<!DOCTYPE html>
<html>
<head>
<title> Intellipaat </title>
</head>
<body style="background-image:url('images/github3.jpg'); background-size: 100%">
<img src="images/github3.jpg" alt="Smiley face" height="42" width="42">
<h2 ALIGN=CENTER>Hello world!</h2>
</body>
</html>

必须加载github.3 jpg

1 个答案:

答案 0 :(得分:-1)

尝试不使用斜杠:

<!DOCTYPE html>
<html>
<head>
<title> Intellipaat </title>
</head>
<body style="background-image:url('images/github3.jpg'); background-size: 100%">
<img src="images/github3.jpg" alt="Smiley face" height="42" width="42">
<h2 ALIGN=CENTER>Hello world!</h2>
</body>
</html>