-
Notifications
You must be signed in to change notification settings - Fork 0
/
percentage.html
133 lines (127 loc) · 5.96 KB
/
percentage.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
<!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></title>
<style>
html, body{
color: #223;
font-size: 21pt;
margin: 0; padding: 0;
}
nav{
font-size: 21pt;
line-height: 1.5em;
position: fixed;
bottom: 0; left: 0;
}
nav a{ color: inherit; }
.col{
text-align: center;
width: 50%;
float: left;
box-sizing: border-box;
}
h4{ text-align: center;}
.container{
outline: 1px solid #eed;
font-size: 42pt;
padding: 37.5vh 12.5vw;
}
.block{
background: #223;
color: #eed;
line-height: 25vh;
text-align: right;
padding: 0 42pt;
position: relative;
}
span{
background: #eed;
color: #223;
line-height: 25vh;
text-align: left;
padding: 0 42pt;
display: block;
width: 50%;
position: absolute;
top: 0; left: 0;
box-sizing: border-box;
}
</style>
</head>
<body>
<h4>data-rellax-speed = default</h4>
<section>
<div class="col">
<br>With Percentage (0.5) <br><br>
<div id="21" class="container"><div class="block">#1<span class="rellax" data-rellax-percentage="0.5">#1</span></div></div>
<div id="22" class="container"><div class="block">#2<span class="rellax" data-rellax-percentage="0.5">#2</span></div></div>
<div id="23" class="container"><div class="block">#3<span class="rellax" data-rellax-percentage="0.5">#3</span></div></div>
<div id="24" class="container"><div class="block">#4<span class="rellax" data-rellax-percentage="0.5">#4</span></div></div>
<div id="25" class="container"><div class="block">#5<span class="rellax" data-rellax-percentage="0.5">#5</span></div></div>
<div id="26" class="container"><div class="block">#6<span class="rellax" data-rellax-percentage="0.5">#6</span></div></div>
</div>
<div class="col">
<br>Without Percentage <br><br>
<div id="21" class="container"><div class="block">#1<span class="rellax">#1</span></div></div>
<div id="22" class="container"><div class="block">#2<span class="rellax">#2</span></div></div>
<div id="23" class="container"><div class="block">#3<span class="rellax">#3</span></div></div>
<div id="24" class="container"><div class="block">#4<span class="rellax">#4</span></div></div>
<div id="25" class="container"><div class="block">#5<span class="rellax">#5</span></div></div>
<div id="26" class="container"><div class="block">#6<span class="rellax">#6</span></div></div>
</div>
</section>
<!-- /// -->
<h4>data-rellax-speed = 2</h4>
<section>
<div class="col">
<br>With Percentage (0.5) <br><br>
<div class="container"><div class="block">#1<span class="rellax" data-rellax-speed="2" data-rellax-percentage="0.5">#1</span></div></div>
<div class="container"><div class="block">#2<span class="rellax" data-rellax-speed="2" data-rellax-percentage="0.5">#2</span></div></div>
<div class="container"><div class="block">#3<span class="rellax" data-rellax-speed="2" data-rellax-percentage="0.5">#3</span></div></div>
<div class="container"><div class="block">#4<span class="rellax" data-rellax-speed="2" data-rellax-percentage="0.5">#4</span></div></div>
<div class="container"><div class="block">#5<span class="rellax" data-rellax-speed="2" data-rellax-percentage="0.5">#5</span></div></div>
<div class="container"><div class="block">#6<span class="rellax" data-rellax-speed="2" data-rellax-percentage="0.5">#6</span></div></div>
</div>
<div class="col">
<br>Without Percentage <br><br>
<div class="container"><div class="block">#1<span class="rellax" data-rellax-speed="2">#1</span></div></div>
<div class="container"><div class="block">#2<span class="rellax" data-rellax-speed="2">#2</span></div></div>
<div class="container"><div class="block">#3<span class="rellax" data-rellax-speed="2">#3</span></div></div>
<div class="container"><div class="block">#4<span class="rellax" data-rellax-speed="2">#4</span></div></div>
<div class="container"><div class="block">#5<span class="rellax" data-rellax-speed="2">#5</span></div></div>
<div class="container"><div class="block">#6<span class="rellax" data-rellax-speed="2">#6</span></div></div>
</div>
</section>
<!-- /// -->
<h4>Misc</h4>
<section>
<div class="col">
<br>With Percentage (0.5) <br><br>
<div class="container"><div class="block">#1<span class="rellax" data-rellax-speed="1" data-rellax-percentage="0.5">#1</span></div></div>
<div class="container"><div class="block">#2<span class="rellax" data-rellax-speed="-1" data-rellax-percentage="0.5">#2</span></div></div>
<div class="container"><div class="block">#3<span class="rellax" data-rellax-speed="4" data-rellax-percentage="0.5">#3</span></div></div>
<div class="container"><div class="block">#4<span class="rellax" data-rellax-speed="-4" data-rellax-percentage="0.5">#4</span></div></div>
<div class="container"><div class="block">#5<span class="rellax" data-rellax-speed="0" data-rellax-percentage="0.5">#5</span></div></div>
<div class="container"><div class="block">#6<span class="rellax" data-rellax-speed="-10" data-rellax-percentage="0.5">#6</span></div></div>
</div>
<div class="col">
<br>Without Percentage <br><br>
<div class="container"><div class="block">#1<span class="rellax" data-rellax-speed="1">#1</span></div></div>
<div class="container"><div class="block">#2<span class="rellax" data-rellax-speed="-1">#2</span></div></div>
<div class="container"><div class="block">#3<span class="rellax" data-rellax-speed="0">#3</span></div></div>
<div class="container"><div class="block">#4<span class="rellax" data-rellax-speed="0">#4</span></div></div>
<div class="container"><div class="block">#5<span class="rellax" data-rellax-speed="0">#5</span></div></div>
<div class="container"><div class="block">#6<span class="rellax" data-rellax-speed="0">#6</span></div></div>
</div>
</section>
<!-- Scripts -->
<script src="../rellax.js"></script>
<script>
var rellax = new Rellax();
</script>
</body>
</html>