如何進行以下div的出現在下面的HTML內嵌滾動如何使div在下面的代碼中內聯顯示?
<div id="scrollable">
<div class="childDiv">
<div class="inner">I am the first div in first should appear inline with the rest of the text</div>
<div class="inner">I am the second div in first should appear inline with the rest of the text</div>
</div>
<div class="childDiv">
<div class="inner">I am the first div in Second should appear inline with the rest of the text</div>
<div class="inner">I am the second div in Second should appear inlinewith the rest of the text </div>
</div>
這是我寫
#scrollable {
width : 50%;
height : 350px;
background-color: #d0e4fe;
overflow-x: scroll;
overflow-y: hidden;
}
.childDiv {
float: left;
}
.inner {
float : left;
}
while the floating the element the'width' property required。 –