我正在嘗試使一系列DIV元素並排坐在一起。 Howeever我遇到的問題浮動:在div上不工作,因爲它應該
HTML:
<div id="comic" class="comic">
<div class="comic_panel">1</div>
<div class="comic_panel">2</div>
<div class="comic_panel">3</div>
<div class="comic_panel">4</div>
<div class="comic_panel">5</div>
<div class="comic_panel">6</div>
<div class="comic_panel">7</div>
<div class="comic_panel">8</div>
<div class="comic_panel">9</div>
<div class="comic_panel">10</div>
<div class="comic_panel">11</div>
<div class="comic_panel">12</div>
<div class="comic_panel">13</div>
<div class="comic_panel">14</div>
</div>
CSS:
#comic{
height: 563px;
width: 1000px;
background: black;
margin: auto;
color:white;
position:relative;
overflow:auto;
}
.comic_panel{
width:1000px;
height:563px;
position:relative;
float:left;
background:orange;
}
但是結果我得到的僅僅是尼思彼此下顯示的DIV。
但不應該讓滾動條出現,這就是我想要的 – nmyster
@n myster就像這樣:http:// jsfiddle。net/h2StP/show? –
謝謝加載,我愛你。 – nmyster