我正在尝试制作一个简单的页面,其中有几行图像,每行图像都有水平滚动(使用 Nicescroll 3 )。
使用鼠标,当行的水平滚动结束后,鼠标滚轮没有任何作用。我想做的是水平滚动完成后页面继续垂直滚动。
我的代码:
HTML:
<div id="main-content">
<div class="row">
<div class="square-container">
<div class="square"></div>
</div>
<!-- several other square-container divs -->
<div class="square-container">
<div class="square"></div>
</div>
</div>
<div class="row">
<!-- several other square-container divs -->
</div>
<!-- several other rows -->
</div>
</div>
CSS:
#main-content{
min-height: 100%;
height: auto;
}
#main-content > .row {
overflow-x:scroll;
overflow-y:hidden;
white-space:nowrap;
}
.square-container {
float:none;
display:inline-block;
margin: 20px 30px 5px 30px;
}
.square{
height: 100px;
width: 100px;
border: 1px solid black;
}
这是我的 Fiddle
最佳答案
关于javascript - Nicescroll 3 - 水平滚动结束后垂直滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26806880/