-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
146 lines (139 loc) · 7.78 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<title>OnScroll Animation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="dist/onscroll-animation.css">
<link rel="stylesheet" href="plugins/prism.css">
<link rel="stylesheet" href="styles/css/app.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js">
</script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]-->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-161869214-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-161869214-2');
</script>
</head>
<body>
<header>
<div class="github-link" data-animation="fade-down" data-animation-delay="1000">
<a href="https://github.com/taimursaeed/onscroll-animation" target="_blank"><img src="images/Octocat.png"
alt="Github Link"></a>
</div>
<div class="container">
<div class="intro">
<div class="title">
<div>
<h1 data-animation="fade-up">OnScroll Animation</h1>
<p data-animation="fade-up" data-animation-delay="100">Trigger animation on scroll</p>
</div>
<div>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74 82.75" data-animation="fade-up">
<g id="Layer_2" data-name="Layer 2">
<g id="Layer_1-2" data-name="Layer 1">
<g id="Layer_1-2-2" data-name="Layer 1-2">
<rect x="17" y="12.4" width="40" height="3" />
<rect x="17" y="18.4" width="40" height="3" />
<rect x="17" y="24.4" width="28" height="3" />
<rect x="17" y="32.6" width="25" height="15" />
<rect x="44" y="32.6" width="13" height="15" />
<path
d="M68.5,0H5.5A5.55,5.55,0,0,0,0,5.5v49A5.55,5.55,0,0,0,5.5,60h63A5.55,5.55,0,0,0,74,54.5V5.5A5.55,5.55,0,0,0,68.5,0ZM71,54.5A2.48,2.48,0,0,1,68.54,57H5.5A2.48,2.48,0,0,1,3,54.54V5.5A2.48,2.48,0,0,1,5.46,3h63A2.48,2.48,0,0,1,71,5.46v49Z" />
<path
d="M12.1,76.21V63.38c0-.4-.49-.73-1.1-.73s-1.1.33-1.1.73V76.21c0,.4.49.73,1.1.73S12.1,76.61,12.1,76.21Z" />
<path
d="M12.1,82V78.73c0-.4-.49-.73-1.1-.73s-1,.23-1.09.59a.2.2,0,0,0,0,.07v3.26c0,.4.49.73,1.1.73s1-.23,1.09-.6A.13.13,0,0,0,12.1,82Z" />
<path
d="M24,68.55c-.61,0-1.09.23-1.1.51h0v9c0,.28.49.51,1.1.51s1.1-.23,1.1-.51h0v-9C25.09,68.78,24.61,68.55,24,68.55Z" />
<path
d="M37,62.75c-.61,0-1.09.33-1.1.73h0V76.22c-.06.4.39.75,1,.79s1.14-.26,1.2-.66V63.48C38.06,63.09,37.59,62.78,37,62.75Z" />
<path
d="M38.1,82V78.72c.06-.4-.39-.75-1-.79s-1.14.26-1.2.66h0V82c-.06.4.39.75,1,.79s1.14-.26,1.2-.66h0Z" />
<path
d="M48.9,74.14c0,.28.49.51,1.1.51s1.1-.23,1.1-.51v-9c0-.28-.49-.51-1.1-.51s-1.1.23-1.1.51Z" />
<path
d="M63,62.65c-.61,0-1.09.33-1.1.73h0V76.2c0,.41.49.74,1.1.74s1.1-.33,1.1-.73h0V63.38C64.09,63,63.61,62.65,63,62.65Z" />
<path
d="M61.9,78.66v3.26c0,.4.49.73,1.1.73s1.1-.33,1.1-.73V78.66c0-.4-.49-.73-1.1-.73s-1.1.33-1.1.73Z" />
</g>
</g>
</g>
</svg>
</div>
</div>
<hr data-animation="fade-up" data-animation-delay="200">
</div>
</div>
</header>
<main>
<div class="container">
<h2>
Animation Examples
</h2>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade">
</div>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade-up"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade-up">
</div>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade-down"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade-down">
</div>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade-left"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade-left">
</div>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade-right"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade-right">
</div>
<hr>
<h2>
Animation Options
</h2>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade-down" data-animation-delay="1000"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade-down" data-animation-delay="1000">
</div>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade-down" data-animation-speed="3000"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade-down" data-animation-speed="3000">
</div>
<div class="col2">
<div>
<pre> <code class="language-html"> <div data-animation="fade-down" data-animation-offset="300"> </code> </pre>
</div>
<img src="https://via.placeholder.com/600x300" data-animation="fade-down" data-animation-offset="300">
</div>
</div>
</main> <!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="plugins/prism.js"></script>
<script src="dist/onscroll-animation.js"></script>
</body>
</html>