我的move.js始終實現(xiàn)不了,是不是要引入什么文件呀
afterLaod:function(link,index){
? ?
? ? switch(index){
? ? case 1:
? ? move('.font1').scale(0.1).end();
? ? move('.font2').scale(1.5).end();
? ? break;? ?
? ? case 2:
? ? break;
? ? case 3:
? ? break;
? ? case 4:
? ? break;
? ? default:
? ? break;
? ? }
? ?},
2018-10-17
我也遇到過這個問題,這是因為你用了新版的fullPage.js,你去看看新的官方文檔,afterLoad回調(diào)函數(shù)的參數(shù)已經(jīng)變了,和教程中的不一樣。
這是我實現(xiàn)的代碼:
//借助move.js來實現(xiàn)css3動畫
afterLoad: function(index,nextIndex) {
switch (nextIndex.index){
case 0:
move(".section1 h1").scale(1.5).end(); //end()方法結(jié)束動畫
move(".section1 p").set('margin-top', '5%').end();
break;
case 1:
move(".section2 h1").scale(0.7).end();
break;
case 2:
move(".section3 h1").set('margin-left', '20%').end();
move(".section3 p").set('margin-left', '20%').end();
break;
case 3:
//層層回調(diào)
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;
}
},