如何在DIV上设置nowrap?特别是包含许多亚DIV

时间:2011-12-15 09:48:16

标签: html parallax nowrap

我想制作视差滚动效果。我使用了下面的方法,但是当添加子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>

1 个答案:

答案 0 :(得分:0)

<style type="text/css">
    div {display:inline;}
</style>