当我使用Fullpage JS并滚动到某个部分的底部时,滚动条会在释放后立即捕捉到该部分的顶部。你怎么防止这种情况?这是一个非常简单的例子:
<body>
<ul id="menu">
<li class="active" data-menuanchor="firstPage"><a href="#firstPage">First slide</a></li>
<li data-menuanchor="secondPage"><a href="#secondPage">Second slide</a></li>
<li data-menuanchor="3rdPage"><a href="#3rdPage">Third slide</a></li>
<li data-menuanchor="4thPage"><a href="#4thPage">Fourth slide</a></li>
</ul>
<div id="fullpage">
<div class="section" id="section0" data-anchor="firstPage"><h1>Page One</h1></div>
<div class="section" id="section1" data-anchor="secondPage"><h1>Page Two</h1></div>
<div class="section" id="section2" data-anchor="3rdPage"><h1>Page Three</h1></div>
<div class="section" id="section3" data-anchor="4thPage"><h1>Page Four</h1></div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#fullpage').fullpage( {
autoScrolling: false,
anchors: ['firstPage', 'secondPage', '3rdPage', '4thPage'],
menu: '#menu',
sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', '#000'],
});
});
</script>
</body>
</html>
在开发者的示例页面上,捕捉不会发生,但我不确定原因: http://alvarotrigo.com/fullPage/examples/normalScroll.html