forked from alumbo/jquery.parallax-scroll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
120 lines (119 loc) · 3.37 KB
/
demo.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jquery.parallax-scroll demo</title>
<link href='http://fonts.googleapis.com/css?family=Quicksand' rel='stylesheet' type='text/css'>
<style>
body {
font-family: 'Quicksand', sans-serif;
margin: 0;
}
section {
width: 1200px;
height: 3000px;
margin: auto;
background: #e7e2dd;
text-align: center;
}
header {
position: relative;
background: #000;
color:#fff;
padding: 80px 0;
font-size: 2em;
}
h1 {
font-weight: normal;
}
.github {
background: #fff;
position: absolute;
top: 10px;
right: 10px;
width: 100px;
}
ul {
text-align: left;
margin-top: 120px;
}
ul.letters {
text-align: right;
width: 1100px;
}
li {
display: inline-block;
list-style: none;
width: 60px;
height: 45px;
border-radius: 60px;
background: #fff;
text-align: center;
padding-top: 15px;
font-size: 24px;
margin: 15px;
}
article {
position: relative;
width: 100%;
height: 370px;
margin-top: 400px;
overflow: hidden;
border-top: 4px solid #fff;
border-bottom: 4px solid #fff;
}
article img {
position: absolute;
bottom:0;
left: 0;
}
article p {
position: absolute;
width: 100%;
margin-top: 120px;
text-transform: uppercase;
color: #fff;
font-size: 6em;
}
div.yeah {
color: #333;
font-size: 8em;
letter-spacing: 20px;
margin-top: 500px;
}
div.yeah p {
display: inline-block;
}
</style>
</head>
<body>
<section>
<header>
<h1>jquery.parallax-scroll demo</h1>
<a href="https://github.com/alumbo/jquery.parallax-scroll"><img class="github" src="img/GitHub_Logo.png" alt="GitHub"/></a>
</header>
<ul>
<li data-parallax='{"x": 650, "from-scroll": 50, "distance": 0, "smoothness": 10}'>1</li>
<li data-parallax='{"x": 650, "from-scroll": 70, "distance": 0, "smoothness": 20}'>2</li>
<li data-parallax='{"x": 650, "from-scroll": 90, "distance": 0}' data-parallax2='{"y": 500, "from-scroll": 400, "distance": 60}'>3</li>
<li data-parallax='{"x": 650, "from-scroll": 110, "distance": 0, "smoothness": 40}'>4</li>
<li data-parallax='{"x": 650, "from-scroll": 120, "easing": "easeOutBack", "easing-return": "easeInOutBack", "duration": 100}'>5</li>
</ul>
<ul class="letters" data-parallax='{"y": 300, "from-scroll": 645, "easing": "easeOutElastic", "duration": 150}'>
<li data-parallax='{"x": -650, "from-scroll": 80, "distance": 30}'>A</li>
<li data-parallax='{"x": -650, "from-scroll": 100, "distance": 60}'>B</li>
<li data-parallax='{"x": -650, "from-scroll": 120, "distance": 90}'>C</li>
<li data-parallax='{"x": -650, "scaleX":0.5, "from-scroll": 140, "distance": 120}'>D</li>
<li data-parallax='{"x": -650, "scale":0.6, "from-scroll": 160, "distance": 180}'>E</li>
</ul>
<article>
<img src="img/paris.jpg" alt="Paris" data-parallax='{"y": 230}'/>
<p>Paris est magique</p>
</article>
<div class="yeah"><p data-parallax='{"z": -600}'>Y</p><p data-parallax='{"z": -500}'>e</p><p data-parallax='{"z": -400}'>a</p><p data-parallax='{"z": -300}'>a</p><p data-parallax='{"z": -200}'>a</p><p data-parallax='{"z": -100}'>h</p><p data-parallax='{"rotateX": 1000}'>!</p></div>
</section>
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/jquery.parallax-scroll.js"></script>
</body>
</html>