具體代碼如下所示:
.imageList{ overflow-x: auto; overflow-y: hidden; height:180px; white-space: nowrap; img{ width:auto; height:100%; margin-right:10px; } }<div class="imageList"> <img src="1.jpg"/> <img src="2.jpg"/> <img src="3.jpg"/> <img src="4.jpg"/> <img src="1.jpg"/></div>

這里注意,img標簽不能左浮動,外層容器必須加不換行
white-space: nowrap;
總結(jié)
以上所述是小編給大家介紹的css實現(xiàn)圖片橫向排列滾動效果,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對武林網(wǎng)網(wǎng)站的支持!
新聞熱點
疑難解答