*{
margin: 0px;
padding: 0px;
}
.container{
background-color:#999999;
width:100%;
margin-top: 10px;
}
.wrapper{
margin-top: 50px;
width:900px;
margin:auto;
}
.dark{
background-color: #FF4500;
height: 40px;
margin-top: 40px;
}
#top_div{
line-height: 40px;
}
#div2{
height: 220px;
}
上面提到的沒有顯示是我的CSS文件
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My static web Page</title>
<link type="text/css" rel="stylesheet" href="css1.css"/>
</head>
<body>
<div class="container">
<div class="wrapper">
<div>
<img src="img.png" width="400" height="400" ></img>
</div>
</div>
</div>
<div class="dark">
<div class="wrapper" id="top_div">
<h2>The Origin</h2>
</div>
</div>
<div class="container">
<div class="wrapper" id="top_div">
This is my styled paragraph
</div>
</div>
</body>
</html>
它只顯示圖像圖標,並沒有看到圖像的瀏覽器。 我已將該圖像粘貼到項目目錄中的文件夾中。請添加圖片的正確方法是什麼,請解釋一下。
仍然不能工作:( –