亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么我的第一屏打開時沒有動畫,從第二屏滾到第一屛時有動畫?


<!DOCTYPE?html>
<html>

<head>
????<meta?charset="utf-8">
????<meta?http-equiv="X-UA-Compatible"?content="IE=edge">
????<meta?name="renderer"?content="webkit">
????<title>fullpage</title>
????<meta?name="description"?content="">
????<meta?name="keywords"?content="">
????<meta?name="author"?content="Jesse">
????<link?href="jquery.fullPage.css"?rel="stylesheet">
????<script?src="jquery.min.js"></script>
????<script?src="jquery.fullPage.min.js"></script>
???
</head>
<style?type="text/css">
section?{?position:?relative;}
.section1?.left?{?width:?100px;?height:?40px;?line-height:?40px;?font-size:?35px;?box-shadow:0px?0px?3px?#FFF;?position:?absolute;?top:?200px;?left:?50px;}
.section1?.right?{width:?100px;?height:?40px;?line-height:?40px;?font-size:?35px;?box-shadow:0px?0px?3px?#FFF;?position:?absolute;?top:?200px;?right:?50px;}
.section2?.left?{?width:?100px;?height:?40px;?line-height:?40px;?font-size:?35px;?box-shadow:0px?0px?3px?#FFF;?position:?absolute;?top:?200px;?left:?50px;}
.section2?.right?{width:?100px;?height:?40px;?line-height:?40px;?font-size:?35px;?box-shadow:0px?0px?3px?#FFF;?position:?absolute;?top:?200px;?right:?50px;}
</style>
<body>
?<script>
????$(function()?{
????????$('#fullpage').fullpage({
????????????
???????????anchors:['page1','page2','page3','page4','page5'],
????????????sectionsColor:['green','orange','gray','red','yellow'],
???????????navigation:true,
????????????afterLoad:function(link,index){
????????????????switch(index){
????????????????????case?0:
????????????????????break;
????????????????????case?1:
????????????????????move('.section1?.left')
????????????????????.x(300)
????????????????????.end();
????????????????????case?2:
?????????????????????move('.section2?.right')
????????????????????.x(-300)
????????????????????.end();
????????????????????break;
????????????????????case?3:
????????????????????break;
?????????????????????case?4:
????????????????????break;
????????????????????default:
????????????????????break;
??????????????????
????????????????}
????????????},
????????????onLeave:function(link,index){
????????????????switch(index){
????????????????????case?0:
????????????????????break;
????????????????????case?1:
????????????????????move('.section1?.left')
????????????????????.x(-300)
????????????????????.end();
????????????????????case?2:
?????????????????????move('.section2?.right')
????????????????????.x(300)
????????????????????.end();
????????????????????break;
????????????????????case?3:
????????????????????break;
?????????????????????case?4:
????????????????????break;
????????????????????default:
????????????????????break;
????????????}
????????}
????????})
????});
????</script>
????<div?id="header"?style="position:fixed;top:20px;right:20px;font-size:?30px;color:#fff;">123</div>
????<div?id="fullpage">
????????<div?class="section?section1">
????????????<div?class="left">
????????????????left
????????????</div>
????????????<div?class="right">
????????????????right
????????????</div>
????????</div>
????????<div?class="section?section2">
?????????<div?class="left">
????????????????left
????????????</div>
????????????<div?class="right">
????????????????right
????????????</div></div>
????????<div?class="section">
????????????<div?class="slide">?Slide?1?</div>
????????????<div?class="slide">?Slide?2?</div>
????????????<div?class="slide?active">?Slide?3?</div>
????????????<div?class="slide">?Slide?4?</div>
????????</div>
????????<div?class="section">section4</div>
????????<div?class="section">section5</div>
????</div>

????

??
???
?????<script?src="http://cdn.bootcss.com/move.js/0.4.0/move.js"></script>
</body>

</html>

老師你好,我想問一下。為什么我的第一屏打開時沒有動畫,從第二屏滾到第一屛時有動畫?

正在回答

2 回答

<!DOCTYPE html>

<html>

?

<head>

? ? <meta charset="utf-8">

? ? <meta http-equiv="X-UA-Compatible" content="IE=edge">

? ? <meta name="renderer" content="webkit">

? ? <title>fullpage</title>

? ? <meta name="description" content="">

? ? <meta name="keywords" content="">

? ? <meta name="author" content="Jesse">

? ? <link rel="stylesheet" >

<script type="text/javascript" src="js/jquery-3.1.1.js" ></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.6.7/vendors/jquery.easings.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.6.7/jquery.fullPage.js"></script>

? ??

</head>

<style type="text/css">

section { position: relative;}

.section1 .left { width: 100px; height: 40px; line-height: 40px; font-size: 35px; box-shadow:0px 0px 3px #FFF; position: absolute; top: 200px; left: 50px;}

.section1 .right {width: 100px; height: 40px; line-height: 40px; font-size: 35px; box-shadow:0px 0px 3px #FFF; position: absolute; top: 200px; right: 50px;}

.section2 .left { width: 100px; height: 40px; line-height: 40px; font-size: 35px; box-shadow:0px 0px 3px #FFF; position: absolute; top: 200px; left: 50px;}

.section2 .right {width: 100px; height: 40px; line-height: 40px; font-size: 35px; box-shadow:0px 0px 3px #FFF; position: absolute; top: 200px; right: 50px;}

</style>

<body>

?<script>

? ? $(function() {

? ? ? ? $('#fullpage').fullpage({

? ? ? ? ? ? ?

? ? ? ? ? ?anchors:['page1','page2','page3','page4','page5'],

? ? ? ? ? ? sectionsColor:['green','orange','gray','red','yellow'],

? ? ? ? ? ?navigation:true,

? ? ? ? ? ? afterLoad:function(link,index){

? ? ? ? ? ? ? ? switch(index){

? ? ? ? ? ? ? ? ? ? case 0:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? case 1:

? ? ? ? ? ? ? ? ? ? move('.section1 .left')

? ? ? ? ? ? ? ? ? ? .x(300)

? ? ? ? ? ? ? ? ? ? .end();

? ? ? ? ? ? ? ? ? ? case 2:

? ? ? ? ? ? ? ? ? ? ?move('.section2 .right')

? ? ? ? ? ? ? ? ? ? .x(-300)

? ? ? ? ? ? ? ? ? ? .end();

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? case 3:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? ?case 4:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? default:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ?

? ? ? ? ? ? ? ? }

? ? ? ? ? ? },

? ? ? ? ? ? onLeave:function(link,index){

? ? ? ? ? ? ? ? switch(index){

? ? ? ? ? ? ? ? ? ? case 0:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? case 1:

? ? ? ? ? ? ? ? ? ? move('.section1 .left')

? ? ? ? ? ? ? ? ? ? .x(-300)

? ? ? ? ? ? ? ? ? ? .end();

? ? ? ? ? ? ? ? ? ? case 2:

? ? ? ? ? ? ? ? ? ? ?move('.section2 .right')

? ? ? ? ? ? ? ? ? ? .x(300)

? ? ? ? ? ? ? ? ? ? .end();

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? case 3:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? ?case 4:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? default:

? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? }

? ? ? ? }

? ? ? ? })

? ? });

? ? </script>

? ? <div id="header" style="position:fixed;top:20px;right:20px;font-size: 30px;color:#fff;">123</div>

? ? <div id="fullpage">

? ? ? ? <div class="section section1">

? ? ? ? ? ? <div class="left">

? ? ? ? ? ? ? ? left

? ? ? ? ? ? </div>

? ? ? ? ? ? <div class="right">

? ? ? ? ? ? ? ? right

? ? ? ? ? ? </div>

? ? ? ? </div>

? ? ? ? <div class="section section2">

? ? ? ? ?<div class="left">

? ? ? ? ? ? ? ? left

? ? ? ? ? ? </div>

? ? ? ? ? ? <div class="right">

? ? ? ? ? ? ? ? right

? ? ? ? ? ? </div></div>

? ? ? ? <div class="section">

? ? ? ? ? ? <div class="slide"> Slide 1 </div>

? ? ? ? ? ? <div class="slide"> Slide 2 </div>

? ? ? ? ? ? <div class="slide active"> Slide 3 </div>

? ? ? ? ? ? <div class="slide"> Slide 4 </div>

? ? ? ? </div>

? ? ? ? <div class="section">section4</div>

? ? ? ? <div class="section">section5</div>

? ? </div>

?

? ? ?

?

? ?

? ??

? ? ?<script src="http://cdn.bootcss.com/move.js/0.4.0/move.js"></script>

</body>

?

</html>

我把你的資源改了一下,沒什么問題,第一屏的那個left往左飄也是可以的

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

涼生久夢 提問者

非常感謝!我引入的源有問題。。。
2016-11-09 回復 有任何疑惑可以回復我~
#2

qq_沐沐_14

也遇到這個問題了 成功解決 很感謝!
2017-09-05 回復 有任何疑惑可以回復我~
#3

zhongjing 回復 qq_沐沐_14

怎么解決的,我現在也遇到了
2017-12-25 回復 有任何疑惑可以回復我~

倒是指出修改了哪里呀?afterLoad 我用這個回調,第一屏并不會觸發呀,

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
FullPage.js全屏滾動插件
  • 參與學習       43807    人
  • 解答問題       217    個

基于jQuery的全屏滾動效果插件,讓翻頁顯得格外的高端大氣上檔次

進入課程

為什么我的第一屏打開時沒有動畫,從第二屏滾到第一屛時有動畫?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號