【插件库】Fullpage.js  — 实现整页滚动滚屏效果缩略图

fullPage.js is designed to be easy to use and customize. It includes tens of examples, great documentation and both community and personal support.

html

<div id="fullpage">
    <div class="section">Section 1</div>
    <div class="section">
        <div class="slide">Slide 2.1</div>
        <div class="slide">Slide 2.2</div>
        <div class="slide">Slide 2.3</div>
    </div>
    <div class="section">Section 3</div>
</div>

js

new fullpage('#fullpage', {
    navigation: true,
    responsiveWidth: 700,
    anchors: ['home', 'about-us', 'contact'],
    parallax: true,
    onLeave: function(origin, destination, direction){
        console.log("Leaving section" + origin.index);
    },
});

By lxcss

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注