3 回答

TA貢獻(xiàn)152條經(jīng)驗(yàn) 獲得超59個(gè)贊
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
#main{
position: relative;
}
.box{
padding: 15px 0 0 15px;
float: left;
}
.pic{
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
box-shadow: 0 0 5px #CCC;
}
</style>
</head>
<body>
<div id="main">
<div class="box">
<div class="pic">
<img src="images/0.jpg" />
</div>
</div>
<div class="box">
<div class="pic">
<img src="images/1.jpg" />
</div>
</div>
</div>
</body>
</html>
你的#main的div沒有閉合,這樣就好了
添加回答
舉報(bào)