forked from Se7en-IT/vue-aos
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
121 lines (121 loc) · 5.23 KB
/
index.html
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Vue Aos</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magic/1.1.0/magic.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/0.7.4/tailwind.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="dist/vue-aos.umd.js"></script>
</head>
<body>
<div id="app" class="container mx-auto pt-10">
<vue-aos animation-class="bounceInLeft animated">
<h2 class="text-center mb-32">Vue AOS</h2>
</vue-aos>
<vue-aos animation-class="bounceInRight animated">
<div class="mb-32 text-center">
A Vue component to add Animation on scroll to a Vue component or HTML element.
</div>
</vue-aos>
<vue-aos animation-class="infinite animated tada">
<div class="mb-32 py-32 text-center text-blue">
Scroll down
<div>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAG0lEQVR42mNgwAfKy8v/48I4FeA0AacVDFQBAP9wJkE/KhUMAAAAAElFTkSuQmCC">
</div>
</div>
</vue-aos>
<h2 class="mb-10">
Use with
<a href="https://github.com/daneden/animate.css" target="_blank">Animatecss Effect</a>
</h2>
<div class="flex flex-wrap -mx-16">
<div class="w-full md:w-1/2 my-24 px-16" v-for="item in animateCss">
<vue-aos :animation-class="item.class + ' animated'" :threshold="item.threshold">
<div class="bg-red px-10 py-16 text-center">
{{item.class}} threshold: {{item.threshold}}
</div>
</vue-aos>
</div>
</div>
<h2 class="mb-10">
Use with
<a href="https://github.com/miniMAC/magic">Magic Effect</a>
</h2>
<div class="flex flex-wrap -mx-16">
<div class="w-full md:w-1/2 px-16 my-24" v-for="item in magicCss">
<vue-aos :animation-class="item.class + ' magictime'" :threshold="item.threshold">
<div class="bg-red px-10 py-16 text-center">
{{item.class}} threshold: {{item.threshold}}
</div>
</vue-aos>
</div>
</div>
</div>
<script>
new Vue({
components:{
VueAos: window['vue-aos']
},
el:'#app',
data: function(){
return {
animateCss: [{
"class":"fadeInDownBig",
"threshold": 0.5
}, {
"class": "fadeInUpBig",
"threshold": 0.5
}, {
"class": "rotateInDownLeft",
"threshold": 0
}, {
"class": "rotateInDownRight",
"threshold": 0.5
}, {
"class": "zoomInLeft",
"threshold": 0
}, {
"class": "zoomInRight",
"threshold": 1
}],
magicCss: [{
"class": "twisterInDown",
"threshold": 0.5
}, {
"class": "twisterInUp",
"threshold": 0.5
}, {
"class": "puffIn",
"threshold": 0
}, {
"class": "vanishIn",
"threshold": 0.5
}, {
"class": "openDownLeftRetourn",
"threshold": 0
}, {
"class": "openDownRightRetourn",
"threshold": 1
}, {
"class": "perspectiveLeftRetourn",
"threshold": 0
}, {
"class": "perspectiveRightRetourn",
"threshold": 1
}, {
"class": "swashIn",
"threshold": 0
}, {
"class": "foolishIn",
"threshold": 1
}]
}
}
})
</script>
</body>
</html>