你的位置:首页 > 软件开发 > 网页设计 > css实现图片横向排列滚动

css实现图片横向排列滚动

发布时间:2017-12-06 23:00:07
.imageList{ overflow-x: auto; overflow-y: hidden; height:180px; white-space: nowrap; img{ width:auto; height:100%; margin-right:10px ...
.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='/images/loading.gif' data-original="1.jpg"/> <img src='/images/loading.gif' data-original="2.jpg"/> <img src='/images/loading.gif' data-original="3.jpg"/> <img src='/images/loading.gif' data-original="4.jpg"/> <img src='/images/loading.gif' data-original="1.jpg"/></div>

css实现图片横向排列滚动

这里注意,img标签不能左浮动,外层容器必须加不换行

white-space: nowrap;

 

原标题:css实现图片横向排列滚动

关键词:CSS

CSS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。