-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
感謝親愛的,羅布您的評論, 我已經改變了路徑,因爲你告訴我上面,但它是同樣的問題 –