代码如下直接操作即可

1
2
3
4
5
6
7
8
9
10
<link href="https://cdn.bootcdn.net/ajax/libs/animate.css/4.0.0/animate.compat.min.css" rel="stylesheet">
<link href="https://cdn.bootcdn.net/ajax/libs/fullPage.js/2.5.4/jquery.fullPage.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/fullPage.js/2.5.4/jquery.fullPage.js"></script>
<div id="dowebok">
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<script>
$(function () {
$('#dowebok').fullpage({
sectionsColor: ['#fff', '#fff', '#fff', '#000', '#fff'],
anchors: ['page1', 'page2', 'page3', 'page4', 'page5'],
navigation: true,
// menu: '#menu'
afterLoad: function (anchorLink, index) {
var $class = $(".wow" + index);
console.log($class)
$class.find(".main-title").addClass("slideInDown")
switch (index) {
case 1:
$class.addClass("fadeInUpBig");
$class.removeClass("zoomOut");
break;
case 2:
$class.addClass("zoomIn");
break;
case 3:
$class.addClass("backInLeft");
break;
case 4:
$class.addClass("fadeInUp");
break;
case 5:
$class.addClass("zoomInUp");
default:
$class.addClass("zoomIn");
break;
}

if (index !== 1) {
$class.toggleClass("zoomOut");
}
},
onLeave: function (index, direction) {
var $class = $(".wow" + index);
switch (index) {
case 1:
$class.removeClass("fadeInUpBig");
$class.addClass("zoomOut");
break;
case 2:
$class.removeClass("zoomIn");
break;
case 3:
$class.removeClass("backInLeft");
break;
case 4:
$class.removeClass("fadeInUp");
break;
case 5:
$class.removeClass("zoomInUp");
default:
$class.removeClass("zoomIn");
break;
}

if (index !== 1) {
$class.toggleClass("zoomOut");
}
}
});

$(window).resize(function () {
autoScrolling();
});
autoScrolling();
});

function autoScrolling() {
var $ww = $(window).width();
// if ($ww < 750) {
// $.fn.fullpage.setAutoScrolling(false);
// } else {
// $.fn.fullpage.setAutoScrolling(true);
// }
}
</script>