fullpage用法

基本用法

<div id="main"> 
    <div class="section section1 ">
        <div id="banner" class="layui-carousel">
            <div carousel-item>
            <div class="banner1 "  >
                <p><span class="glyphicon glyphicon-chevron-down " ></span></p>
            </div>
            <div class="banner2" >
            <p><span class="glyphicon glyphicon-chevron-down" ></span></p>
            </div>
        </div>
    </div>
</div>
<div class="section section2"  data-menuanchor="firstPage">
</div>
<div class="section section3">
<div class="wmlinkimg " >
![](img/wmlink1.png)
</div>
</div>
<div class="section section4"></div>
</div>
$("#main").fullpage({
       //锚点
    anchors:['section1','section2','section3','section4','section5','section6'],
      //先清除所有的动画
    afterLoad:function(anchorLink,index){
        $('.computer').hide();
        $('.computerfan').hide();
        $('.wmlinkimg').hide();
        $('.reapimg').hide();
        $('.myfriendsimg').hide();
        $('.myfriendsimg2').hide();
        $('.computerfan').hide();

        if (index == 2) {
            $('.computer').show().addClass('computermove');
            $('.computerfan').show().addClass('computerfanmove');
        } 
        if (index == 3) {
            $('.wmlinkimg').show().addClass('animated rollIn');
        } 
        if (index == 5) {
            $('.reapimg').show().addClass('animated bounceInLeft');
        } 
        if (index == 7) {
            $('.myfriendsimg').show().addClass('animated bounceInDown');
            $('.myfriendsimg2').show().addClass('animated bounceIn');
        } 
    }
});

js函数

//向下跳一页
$('#banner div div p span').click(function () {
    $.fn.fullpage.moveSectionDown()
})
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容