【发布时间】:2017-06-26 07:37:13
【问题描述】:
我想制作图像滚动器,其中图像可以水平滚动,但不希望水平滚动条在滚动时可见。 下面是我的codepen的链接..
http://codepen.io/rajMrPerfect/pen/PWewRM?editors=0100
<div class="scroll">
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
<img src="http://placehold.it/100x100" />
</div>
.scroll {
height: 180px;
margin: auto;
overflow-x: auto;
overflow-y:hidden;
white-space: nowrap;
box-shadow: 0 0 10px #000;
img {
margin: 20px 10px 0 10px;
}
}
【问题讨论】:
-
如果没有滚动条,你希望它如何滚动?
-
我想像普通滚动条一样滚动但隐藏滚动条。
-
那么用户交互会是什么?鼠标滚轮?拖动不可见的滚动条?
-
这有点像拖动一个不可见的滚动条
标签: javascript html css angularjs less