為什么添加的背景圖片沒效果?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文本</title>
<style type="text/css">
.content{border:4px solid #badbdb;}
.book{background:url(images\t_book.gif) no-repeat #eff9f9;}
img{border:1px solid #b1adaa; margin:10px 18px;}
</style>
</head>
<body>
<div class="content book">
<img src="images\book1.jpg" width="80" height="80"/>
<img src="images\book2.jpg" width="80" height="80"/>
<img src="images\book3.jpg" width="80" height="80"/>
<img src="images\book4.jpg" width="80" height="80"/>
<img src="images\book5.jpg" width="80" height="80"/>
</div>
</body>
</html>

2016-04-08
用你的代碼運行了一下,圖片地址的 反斜杠 錯了
2016-04-08
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
img {
margin: 0px 18px 0px 18px;
height: 80px;
width: 80px;
border: 1px solid #ccc;
}
.content {
margin: 0px;
border: 4px solid #cbc;
}
.book {
padding: 75px 0px 0px 0px;
background: url(images/location-on.png) no-repeat;
}
</style>
</head>
<body>
<div class="content book">
<img src="images/[email protected]">
<img src="images/[email protected]">
<img src="images/[email protected]">
</div>
</body>
</html>
2016-04-08
跟我寫的一樣 不過我的圖片是網上自己找的,看下web檢查器有沒有找到圖片吧
2016-04-08
?看看是不是路徑錯了