-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
194 lines (175 loc) · 14.8 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html>
<head>
<title>parallax-vanilla.js</title>
<link rel="stylesheet" type="text/css" href="./test/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="./test/css/demo.css">
<link rel="stylesheet" type="text/css" href="./dist/parallax-vanilla.css">
<link rel="shortcut icon" type="image/png" href="./test/media/favicon.png" />
<style>
.filler {
height: 50vh;
}
</style>
</head>
<body>
<div class="pv-container" pv-height=50vh>
<div class="pv-block" pv-speed=-1.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/leaves.jpg></div>
<div class="text-wrapper">
<div class="pv-block" pv-speed=3.14 pv-mediatype=none>
<h1>Super lightweight without dependencies</h1>
<h3>A few kilobytes of pure JavaScript.</h3>
</div>
</div>
</div>
<div class="pv-container" pv-height=50vh>
<div class="pv-block" pv-speed=1.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/leaves.jpg></div>
<div class="text-wrapper">
<div class="pv-block" pv-speed=-3.14 pv-mediatype=none>
<h1>Dynamic sizing</h1>
<h3>Image-elements are dynamically sized and adjusted relative to the pv-speed.</h3>
</div>
</div>
</div>
<div class="filler">
<div>
<h1>Media type independence</h1>
<h3>The parallax effect applies not only on images but on videos as well.</h3>
</div>
</div>
<div class="pv-container" pv-height=50vh>
<div class="pv-block" pv-speed=-5 pv-mediatype=video pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/animal.mp4></div>
</div>
<div class="pv-container" pv-height=50vh>
<div class="pv-block" pv-speed=-5 pv-mediatype=video pv-mute=true pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/Sunrise%20-%207127.mp4></div>
</div>
<div class="filler">
<div>
<h1>Performance is key</h1>
<h3>Maximize your parallax effects with hardware acceleration and
<i>zero</i> external libraries.</h3>
</div>
</div>
<div class="pv-container container-fluid" pv-height=40vh>
<div class="row">
<div class="col-xs-1 pv-block" pv-speed=-1.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.4 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.5 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.6 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.7 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.8 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.9 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
</div>
</div>
<div class="container-fluid pv-container" pv-height=10vh>
<div class="row">
<div class="col-xs-6">
<div class="col-xs-1 pv-block" pv-speed=1.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.4 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.5 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.6 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.7 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.8 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.9 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
</div>
<div class="col-xs-6">
<div class="col-xs-1 pv-block" pv-speed=2.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.4 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.5 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.6 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.7 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.8 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.9 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=3.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=3.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=3.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=3.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
</div>
</div>
</div>
<div class="pv-container container-fluid" pv-height=10vh>
<div class="row">
<div class="col-xs-6">
<div class="col-xs-1 pv-block" pv-speed=-1.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.4 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.5 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.6 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.7 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.8 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-1.9 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
</div>
<div class="col-xs-6">
<div class="col-xs-1 pv-block" pv-speed=-2.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.4 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.5 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.6 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.7 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.8 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-2.9 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-3.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-3.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-3.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=-3.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
</div>
</div>
</div>
<div class="pv-container container-fluid" pv-height=40vh>
<div class="row">
<div class="col-xs-1 pv-block" pv-speed=1.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.2 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.3 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.4 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.5 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.6 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.7 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.8 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=1.9 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.0 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
<div class="col-xs-1 pv-block" pv-speed=2.1 pv-mediapath=https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg></div>
</div>
</div>
<div class="filler">
<div>
<h1>Viewport-only animations</h1>
<h3>Parallax elements are only animated within the current viewport, saving enormous resources.</h3>
</div>
</div>
<div class="pv-container" pv-height=100vh>
<div class="pv-block" pv-speed=3.14 pv-mediapath=test/media/reflection.jpg></div>
</div>
<script type="text/javascript" src="./dist/parallax-vanilla.js"></script>
<script type="text/javascript">
const demoSettings = {
container: {
class: 'pv-container',
height: '251px',
},
block: {
class: 'pv-block',
speed: -1,
mediatype: 'image',
mediapath: 'https://raw.githubusercontent.com/erikengervall/parallax-vanilla/master/test/media/ladybug.jpg',
},
}
pv.init(demoSettings)
</script>
</body>
</html>