代碼如下:<div class="nowrap"> <div class="item-t"></div> <div class="item-t"></div> <div class="item-t"></div> <div class="item-t"></div></div>css樣式:.nowrap{ white-space: nowrap; overflow-x: scroll; height: 200px;}.item-t{ display: inline; float: left; width: 108px; height: 200px; background: yellow; vertical-align: top;}.item-t+.item-t{ margin-left: 15px;}以上div還是會(huì)換行,并且只顯示縱向滾動(dòng)條。求大神解答!??!
2 回答

李曉健
TA貢獻(xiàn)1036條經(jīng)驗(yàn) 獲得超461個(gè)贊
.nowrap{ ????white-space:?nowrap; ????overflow-x:?scroll; ????height:?200px; ????overflow-y:?hidden;??/***這行加上就好了***/ }
添加回答
舉報(bào)
0/150
提交
取消