Nicescroll 3 - 水平滚动结束后的垂直滚动

时间:2014-11-07 17:35:19

标签: javascript jquery scroll mousewheel nicescroll

我正在尝试制作一个简单的页面,其中有多行图像,每一行都有一个水平滚动(使用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

1 个答案:

答案 0 :(得分:3)

感谢您的反馈。

添加到TODO列表。

问题已开启 - &gt; https://github.com/inuyaksa/jquery.nicescroll/issues/451

相关问题