forked from appleple/backpax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
42 lines (42 loc) · 1.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<style>
.parallax {
width: 100%;
height: 500px;
display: flex;
align-items: center;
justify-content: center;
}
.parallax p {
font-size: 24px;
position: relative;
z-index: 10;
color: #FFF;
}
.spacer {
height: 1000px;
}
</style>
<div class="spacer"></div>
<div class="js-parallax parallax"
data-img="https://images.unsplash.com/photo-1557486727-b1a680e36e8f?crop=entropy&cs=tinysrgb&fit=crop&fm=jpg&h=900&ixid=eyJhcHBfaWQiOjF9&ixlib=rb-1.2.1&q=80&w=1600"
data-img-767="https://images.unsplash.com/flagged/photo-1565241758499-3bf9d63d9094?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1834&q=80"
data-img-1024="https://images.unsplash.com/flagged/photo-1565241758499-3bf9d63d9094?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1834&q=80"
>
<p>Hello World!</p>
</div>
<div class="spacer"></div>
<script src="./bundle/backpax.js"></script>
<script>
new Backpax('.js-parallax');
</script>
</body>
</html>