-1
enter image description here这是我的第一个HTML项目,在这里iam试图为#nheader id放置背景图片,但是当我切换鳕鱼浏览器告诉我它无法加载我不知道原因?为什么我的标题背景图像不起作用?
<html>
<!--this is the
start html file-->
<head>
<meta keywords="html, laern, teach"/>
<link rel="stylesheet" type="text/css" href="style.css">
<title> this is a website </title>
</head>
<body>
<div id="wrap">
<div id="nheader">
<h1>how to write html5</h1>
<img src="..my demo/images/body.jpg">
</div>
<div id="npara">
<p class="text_para">
Lorem ipsum dolor sit amet, <span class="color">consectetur</span> adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
</p>
</div>
<div id="footer">
<p class="text_para">
this is footer
</p>
</div>
</div>
</body>
<!--here ends th html file -->
</html>
'..my demo/images/body.jpg'不是一个有效的路径,应该是'../my demo/images/body.jpg',但这取决于你的设置。同时避免在路径中使用空格 – moritzg
一个闪亮的例子,为什么HTML和CSS验证器在每个网页创建中扮演重要角色。 – Rob
感谢亲爱的,罗布您的评论, 我已经改变了路径,因为你告诉我上面,但它是同样的问题 –