-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
82 lines (77 loc) · 2.39 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
<!DOCTYPE html>
<html>
<head>
<script src="scroll.js"></script>
<title>
scroll.js - The coolest animated scrolling library, ever! </title>
<style>
.scrolljs {
animation-play-state: paused !important;
animation-duration: 1s !important;
animation-timing-function: linear !important;
}
body{
background: linear-gradient(#fed26a, #fec238);
height:200vh;
margin:0px;
font-family: sans-serif;
}
svg.scrolljs {
margin:0px;
z-index:0;
position: fixed;
top: 0;
pointer-events: none;
}
img{
z-index:10;
}
h1 {
font-family: monospace;
font-weight: 200;
}
a.button-style {
text-decoration: none;
color: white;
background: #982798;
padding: 15px;
margin-top: 33px;
display: block;
max-width: max-content;
margin-left: auto;
margin-right: auto;
border-radius: 1rem;
}
a:hover {
text-decoration: underline;
}
#description {
margin-top: 150vh;
margin-right: auto;
margin-left: auto;
text-align: center;
font-size: larger;
}
@keyframes fadeup{
from{opacity:1; transform: translateY(-100px); }
to{opacity:0}
}
@keyframes zoom {
from{transform: scale(0); }
to{ transform: scale(1) }
}
</style></head>
<body>
<svg height="800px" style="animation: fadeup" class="scrolljs" data-range="0to100" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
<path fill="#47beff" fill-opacity="1" d="M0,224L21.8,234.7C43.6,245,87,267,131,229.3C174.5,192,218,96,262,90.7C305.5,85,349,171,393,176C436.4,181,480,107,524,80C567.3,53,611,75,655,101.3C698.2,128,742,160,785,154.7C829.1,149,873,107,916,80C960,53,1004,43,1047,80C1090.9,117,1135,203,1178,213.3C1221.8,224,1265,160,1309,122.7C1352.7,85,1396,75,1418,69.3L1440,64L1440,0L1418.2,0C1396.4,0,1353,0,1309,0C1265.5,0,1222,0,1178,0C1134.5,0,1091,0,1047,0C1003.6,0,960,0,916,0C872.7,0,829,0,785,0C741.8,0,698,0,655,0C610.9,0,567,0,524,0C480,0,436,0,393,0C349.1,0,305,0,262,0C218.2,0,175,0,131,0C87.3,0,44,0,22,0L0,0Z"></path>
</svg>
<div id="description">
<h1>
Parallax Superpowers in
under 1KB of Code </h1>
<p> Program in CSS - no JS knowledge required! </p>
<p class="scrolljs" style="animation: zoom" data-range="0to125"> But if you know JS, that's great too ;) </p>
<a class="button-style" href="https://github.com/code3z/scrolljs">Check out scroll.js</a>
</div>
</body>
</html>