为了账号安全,请及时绑定邮箱和手机立即绑定

为什么我这里写的和老师一样,第一屏加载之后没有效果,第四屏滚动不了。第二屏和第三屏是好的,第一屏返回过去也是正常的

$(document).ready(function(){
   $("#fullpage").fullpage({
       verticalCentered:false,
       anchors:['page1','page2','page3','page4'],
       navigation:true,
       navigationTooltips:['它,终于来了。','真正与你贴近的个人设备','非同一般的精准计时','在三个特点鲜明的系列中找到你的风格'],

       afterLoad:function(link,index){
           switch(index){
               case 1:
                       move('.section1 h1').scale(1.5).end();
                       move('.section1 p').set('margin-top','5%').end();
                       console.log(move('.section1 p').set('margin-top','5%').end());
                   break;
               case 2:
                       move('.section2 h1').scale(0.7).end();
                   break;
               case 3:
                   move('.section3 h1').set('margin-left','20%').end();
                   move('.section3 p').set('margin-left','20%').end();
                   break;
               case 4:
                       move('.section4 img.primary').rotate(360).end(function(){
                           move('.section4 img.sport').rotate(360).end(function(){
                               move('.section4 img.edition').rotate(360).end(function(){
                                   move('.section4 h4.primary').scale(1.3).end(function(){
                                       move('.section4 h4.sport').scale(1.3).end(function(){
                                           move('.section4 h4.edition').scale(1.3).end();
                                       });
                                   });
                               });
                           });
                       });
                   break;
               default:
                   break;
           }
       },
       onLeave:function(link,index){
           switch(index){
               case 1:
                   move('.section1 h1').scale(1).end();
                   move('.section1 p').set('margin-top','800px').end();
                   break;
               case 2:
                   move('.section2 h1').scale(1).end();
                   break;
               case 3:
                   move('.section3 h1').set('margin-left','-1500px').end();
                   move('.section3 p').set('margin-left','1500px').end();
                   break;
               case 4:
                   move('.section4 img.primary').rotate(-360).end();
                   move('.section4 img.sport').rotate(-360).end();
                   move('.section4 img.edition').rotate(-360).end();
                   move('.section4 h4.primary').scale(1).end();
                   move('.section4 h4.sport').scale(1).end();
                   move('.section4 h4.edition').scale(1).end();
                   break;
               default:
                   break;
           }
       },
       afterRender:function(){
       }
   });
});

正在回答

2 回答

我也是这样,你解决了 么  哥们

0 回复 有任何疑惑可以回复我~
#1

上玄月 提问者

没有解决
2017-04-18 回复 有任何疑惑可以回复我~

插件库的引入顺序也和老师一样?

1 回复 有任何疑惑可以回复我~
#1

上玄月 提问者

一摸一样
2017-04-18 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
FullPage.js全屏滚动插件
  • 参与学习       43807    人
  • 解答问题       217    个

基于jQuery的全屏滚动效果插件,让翻页显得格外的高端大气上档次

进入课程

为什么我这里写的和老师一样,第一屏加载之后没有效果,第四屏滚动不了。第二屏和第三屏是好的,第一屏返回过去也是正常的

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号