Home >Web Front-end >HTML Tutorial >一个大div中有多个div,如何使这些div在同一行显示,并且溢出后产生滚动条而不换行呢_html/css_WEB-ITnose
如题,当里面所有div宽度超过外面div宽度后,产生一个滚动条显示,而不是换行显示。试过用display:inline-flex,但是在ie下不起作用,求助
<style type="text/css">.mt { width: 600px; height: 200px; overflow: auto;}.mk { white-space: nowrap;}.mj { width: 150px; height: 150px; border: 1px solid #999; display: inline-block;}</style></head><body><div class="mt"> <div class="mk"> <div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div><div class="mj"></div> </div></div>