css图片滚动代码示例具体如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css图片滚动代码示例</title>
</head>
<body>
<style>
.imglist{
overflow-x: auto;
overflow-y: hidden;
height:180px;
white-space: nowrap;}
img{
width:auto;
height:100%;
margin-right:10px;
}
</style>
<div class="imglist">
<img src="img/1.png"/>
<img src="img/2.png"/>
<img src="img/3.png"/>
<img src="img/4.png"/>
<img src="img/5.png"/>
</div>
</body>
</html>
注:在 HTML 中,<img> 标签没有结束标签,并且不能左浮动,外层容器必须加不换行。<img> 标签并不会在网页中插入图像,而是从网页上链接图像,创建的是被引用图像的占位空间。
white-space: nowrap;
【相关文章推荐】
【相关视频教程推荐】
MO_ON 
![[爱了]](/js/img/d1.gif)
![[尴尬]](/js/img/d16.gif)