我想做视差滚动效果。我使用了下面的方法,但是当添加子 DIV 时,它会换行:
<div style="height: 300px; width: 100%; overflow-x: auto; overflow-y: hidden;border:solid 1px ;">
<div id="layoutArea" style="width: 9999px;background-color:White; padding:10px 10px 15px 10px;border:solid 0px ;">
<div id = "sub1"></div>
<div id = "sub2"></div>
<div id = "sub3"></div>
<div id = "sub4"></div>
<div id = "sub5"></div>
<div id = "sub6"></div>
.......
</div>
</div>