我有一個包含ul的div,並且在每個li中都有一張圖片。我已經將剩下的圖片放到了一條直線上,但是一旦它到達div的末端,它就會包裹起來。我希望照片繼續向右側隱藏,以便我能夠創建一個旋轉木馬。我的代碼如下。當div寬度很小時停止包裝圖像
的HTML
<div id="container">
<div class="lfbtn"></div>
<ul id="image_container">
<li class="the_image">
<img src="" />
</li>
</ul>
<div class="rtbtn"></div>
</div>
的CSS
#container {
width: 900px;
height: 150px;
margin: 10px auto;
}
#image_container {
position: relative;
left: 50px;
list-style-type: none;
width: 700px;
height: 110px;
overflow: hidden;
}
#image_container li {
display: inline-block;
padding: 7px 5px 7px 5px;
float: left;
}
.lfbtn {
background-image: url(../../img/left.gif);
background-repeat: no-repeat;
margin: 10px;
position: relative;
float: left;
top: -12px;
left: 50px;
height: 90px;
width: 25px;
}
.rtbtn {
background-image: url(../../img/right.gif);
background-repeat: no-repeat;
height: 90px;
width: 25px;
margin: 10px;
position: relative;
top: -101px;
left: 795px;
}
提前感謝!
當你搞清楚它確定它在IE和FireFox中工作。似乎我想出的東西從來沒有... – Peter 2010-03-18 20:10:03