-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.html
executable file
·302 lines (301 loc) · 18.6 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>On-Scroll Text Animations with SVG Clip-Path | Codrops</title>
<meta name="description" content="Some experimental on-scroll typography effects using SVG clip-paths." />
<meta name="keywords" content="svg clip-path text, clip-path animation, on-scroll clip-path animations" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<script>
(function(d) {
var config = {
kitId: 'zcp2fpq',
scriptTimeout: 3000,
async: true
},
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
})(document);
</script>
<link rel="stylesheet" type="text/css" href="css/base.css" />
<script>document.documentElement.className="js";</script>
</head>
<body class="loading">
<main>
<header class="frame">
<h1 class="frame__title">On-Scroll <br>Text Clip-Path <br>Animations</h1>
<a class="frame__back" href="https://tympanus.net/codrops/?p=75256">Article</a>
<a class="frame__prev" href="https://tympanus.net/Tutorials/ParticlesMusicVisualizer">Previous demo</a>
<a class="frame__sub" href="https://tympanus.net/codrops/collective/">Subscribe</a>
</header>
<div class="content">
<svg>
<clipPath id="clip">
<text x="0ch" y="0.95em" class="line-1 font-7 size-3">X</text>
<text x="1ch" y="0.95em" class="line-1 font-7 size-3">o</text>
<text x="2ch" y="0.95em" class="line-1 font-7 size-3">g</text>
<text x="3ch" y="0.95em" class="line-1 font-7 size-3">o</text>
<text x="4ch" y="0.95em" class="line-1 font-7 size-3">x</text>
<text x="5ch" y="0.95em" class="line-1 font-7 size-3">y</text>
</clipPath>
<clipPath id="clip-0">
<text x="0ch" y="0.95em" class="line-2 font-7 size-3">X</text>
<text x="1ch" y="0.95em" class="line-2 font-7 size-3">o</text>
<text x="2ch" y="0.95em" class="line-2 font-7 size-3">g</text>
<text x="3ch" y="0.95em" class="line-2 font-7 size-3">o</text>
<text x="4ch" y="0.95em" class="line-2 font-7 size-3">x</text>
<text x="5ch" y="0.95em" class="line-2 font-7 size-3">y</text>
</clipPath>
</svg>
<div class="poster poster--half" style="clip-path:url(#clip);--offset-x:10%;--offset-y:10%">
<div class="poster__inner" style="background-image:url(img/1.jpg);"></div>
</div>
<div class="poster poster--half" style="clip-path:url(#clip-0);--offset-x:10%;--offset-y:10%">
<div class="poster__inner" style="background-image:url(img/2.jpg);"></div>
</div>
</div>
<div class="content content--text">
<h4>Heart of adversity</h4>
<p>In the heart of adversity, the patient dragon reveals the alchemy of strength: to endure the fiercest storms with unwavering calm, for within the crucible of patience, resilience is forged into an indomitable force.</p>
</div>
<div class="content">
<svg>
<clipPath id="clip-1">
<text x="0ch" y="0.95em" class="line-1 font-1 size-3">X</text>
<text x="1ch" y="0.95em" class="line-1 font-1 size-3">o</text>
<text x="2ch" y="0.95em" class="line-1 font-1 size-3">g</text>
<text x="3ch" y="0.95em" class="line-1 font-1 size-3">o</text>
<text x="4ch" y="0.95em" class="line-1 font-1 size-3">x</text>
<text x="5ch" y="0.95em" class="line-1 font-1 size-3">y</text>
<text x="6ch" y="0.95em" class="line-1 font-1 size-3">e</text>
<text x="7ch" y="0.95em" class="line-1 font-1 size-3">n</text>
<text x="8ch" y="0.95em" class="line-1 font-1 size-3">u</text>
<text x="9ch" y="0.95em" class="line-1 font-1 size-3">x</text>
<text x="10ch" y="0.95em" class="line-1 font-1 size-3">X</text>
<text x="11ch" y="0.95em" class="line-1 font-1 size-3">o</text>
<text x="12ch" y="0.95em" class="line-1 font-1 size-3">g</text>
<text x="13ch" y="0.95em" class="line-1 font-1 size-3">o</text>
<text x="14ch" y="0.95em" class="line-1 font-1 size-3">x</text>
<text x="15ch" y="0.95em" class="line-1 font-1 size-3">y</text>
<text x="16ch" y="0.95em" class="line-1 font-1 size-3">e</text>
<text x="17ch" y="0.95em" class="line-1 font-1 size-3">n</text>
<text x="18ch" y="0.95em" class="line-1 font-1 size-3">u</text>
<text x="19ch" y="0.95em" class="line-1 font-1 size-3">x</text>
</clipPath>
<clipPath id="clip-1-1">
<text x="0ch" y="0.95em" class="line-2 font-1 size-3">X</text>
<text x="1ch" y="0.95em" class="line-2 font-1 size-3">o</text>
<text x="2ch" y="0.95em" class="line-2 font-1 size-3">g</text>
<text x="3ch" y="0.95em" class="line-2 font-1 size-3">o</text>
<text x="4ch" y="0.95em" class="line-2 font-1 size-3">x</text>
<text x="5ch" y="0.95em" class="line-2 font-1 size-3">y</text>
<text x="6ch" y="0.95em" class="line-2 font-1 size-3">e</text>
<text x="7ch" y="0.95em" class="line-2 font-1 size-3">n</text>
<text x="8ch" y="0.95em" class="line-2 font-1 size-3">u</text>
<text x="9ch" y="0.95em" class="line-2 font-1 size-3">x</text>
<text x="10ch" y="0.95em" class="line-2 font-1 size-3">X</text>
<text x="11ch" y="0.95em" class="line-2 font-1 size-3">o</text>
<text x="12ch" y="0.95em" class="line-2 font-1 size-3">g</text>
<text x="13ch" y="0.95em" class="line-2 font-1 size-3">o</text>
<text x="14ch" y="0.95em" class="line-2 font-1 size-3">x</text>
<text x="15ch" y="0.95em" class="line-2 font-1 size-3">y</text>
<text x="16ch" y="0.95em" class="line-2 font-1 size-3">e</text>
<text x="17ch" y="0.95em" class="line-2 font-1 size-3">n</text>
<text x="18ch" y="0.95em" class="line-2 font-1 size-3">u</text>
<text x="19ch" y="0.95em" class="line-2 font-1 size-3">x</text>
</clipPath>
</svg>
<div class="poster poster--half" style="clip-path:url(#clip-1);--offset-x:10%;--offset-y:10%">
<div class="poster__inner" style="background-image:url(img/3.jpg);"></div>
</div>
<div class="poster poster--half" style="clip-path:url(#clip-1-1);--offset-x:10%;--offset-y:10%">
<div class="poster__inner" style="background-image:url(img/4.jpg);"></div>
</div>
</div>
<div class="content content--text">
<h4>Caverns of introspection</h4>
<p>Within the caverns of introspection, the patient dragon discovers the treasures of self-awareness, teaching that the journey inward, undertaken with deliberate slowness, unveils the hidden jewels of enlightenment, shimmering in the recesses of the soul.</p>
</div>
<div class="content">
<svg>
<clipPath id="clip-2">
<text x="0ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-2 size-3">M</text>
<text x="1ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-2 size-3">o</text>
<text x="2ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-2 size-3">m</text>
<text x="3ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-2 size-3">o</text>
<text x="4ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-2 size-3">s</text>
<text x="5ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-2 size-3">o</text>
</clipPath>
</svg>
<div class="poster" style="clip-path:url(#clip-2);">
<div class="poster__inner" style="background-image:url(img/5.jpg);"></div>
</div>
</div>
</div>
<div class="content content--text">
<h4>Seasons change</h4>
<p>As the seasons change, so does the patient dragon adapt, its scales reflecting the myriad hues of nature's cycle. It imparts the lesson that, in embracing the ebb and flow of life's transitions, one discovers a harmonious dance with the cosmic rhythms that shape the universe.</p>
</div>
<div class="content">
<svg>
<clipPath id="clip-3">
<text x="0ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-3 size-2">n</text>
<text x="1ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-3 size-2">o</text>
<text x="2ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-3 size-2">n</text>
<text x="3ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-3 size-2">o</text>
<text x="4ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-3 size-2">n</text>
</clipPath>
</svg>
<div class="poster" style="clip-path:url(#clip-3);--offset-x:20%;">
<div class="poster__inner" style="background-image:url(img/6.jpg);"></div>
</div>
</div>
<div class="content content--text">
<h4>Mist-shrouded valleys</h4>
<p>Through the mist-shrouded valleys, the patient dragon soars, leaving ephemeral trails of wisdom in its wake. It reveals that, like the ever-shifting mists, the only constant is change, and in patiently navigating the ethereal currents, one finds clarity in the midst of life's uncertainties.</p>
</div>
<div class="content">
<svg>
<clipPath id="clip-4">
<text x="0" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-4 size-2">s</text>
<text x="1ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-4 size-2">o</text>
<text x="2ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-4 size-2">x</text>
<text x="3ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-4 size-2">o</text>
<text x="4ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-4 size-2">s</text>
</clipPath>
</svg>
<div class="poster" style="clip-path:url(#clip-4);">
<div class="poster__inner" style="background-image:url(img/7.jpg);"></div>
</div>
</div>
<div class="content content--text">
<h4>The world below</h4>
<p>High atop the cliffs, the patient dragon observes the world below with eyes that mirror the vastness of the cosmos. From this celestial vantage point, it imparts the understanding that true vision arises not from a gaze fixed on the horizon but from a gaze that encompasses the boundless expanse of the present moment.</p>
</div>
<div class="content">
<svg>
<clipPath id="clip-5">
<text x="0ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-5 size-2">b</text>
<text x="1ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-5 size-2">y</text>
<text x="2ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-5 size-2">o</text>
<text x="3ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-5 size-2">s</text>
<text x="4ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-5 size-2">o</text>
<text x="5ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-5 size-2">x</text>
</clipPath>
</svg>
<div class="poster" style="clip-path:url(#clip-5);">
<div class="poster__inner poster__inner--fixed" style="background-image:url(img/8.jpg);"></div>
</div>
</div>
<div class="content content--text">
<h4>Serene sanctuary</h4>
<p>In the serene sanctuary of the Patient Dragon, where ancient whispers met the modern hum, Liúlóng embraced tranquility amidst the chaos. Opting for a path less hurried, the dragon migrated to the fediverse—a decentralized haven where diversity bloomed, and open discourse prevailed.</p>
</div>
<div class="content">
<svg>
<clipPath id="clip-6">
<text x="0ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">k</text>
<text x="1ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">e</text>
<text x="2ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">l</text>
<text x="3ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">p</text>
<text x="4ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">f</text>
<text x="5ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">o</text>
<text x="6ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">r</text>
<text x="7ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">e</text>
<text x="8ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">s</text>
<text x="9ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">t</text>
<text x="10ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-6 size-3">s</text>
</clipPath>
</svg>
<div class="poster" style="clip-path:url(#clip-6);">
<div class="poster__inner" style="background-image:url(img/2.jpg);"></div>
</div>
</div>
<div class="content content--text">
<h4>Calm scales</h4>
<p>With calm scales, it soared into a digital realm echoing the patient strength found in interconnected communities, a sanctuary far from the clamor of mainstream platforms.</p>
</div>
<div class="content content--flex">
<svg class="h-200 w-25">
<clipPath id="clip-7">
<text x="50%" y="1em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">l</text>
<text x="50%" y="2em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">i</text>
<text x="50%" y="3em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">u</text>
<text x="50%" y="4em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">l</text>
<text x="50%" y="5em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">o</text>
<text x="50%" y="6em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">n</text>
<text x="50%" y="7em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">g</text>
</clipPath>
</svg>
<div class="poster h-200 w-25" style="clip-path:url(#clip-7);">
<div class="poster__inner" style="background-image:url(img/9.jpg);"></div>
</div>
<svg class="h-200 w-25">
<clipPath id="clip-8">
<text x="50%" y="1em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">g</text>
<text x="50%" y="2em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">n</text>
<text x="50%" y="3em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">o</text>
<text x="50%" y="4em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">l</text>
<text x="50%" y="5em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">u</text>
<text x="50%" y="6em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">i</text>
<text x="50%" y="7em" dominant-baseline="middle" text-anchor="middle" class="font-8 size-4">l</text>
</clipPath>
</svg>
<div class="poster h-200 w-25" style="clip-path:url(#clip-8);">
<div class="poster__inner" style="background-image:url(img/10.jpg);"></div>
</div>
</div>
<div class="content content--text">
<h4>Ancient willow</h4>
<p>Beside the ancient willow, the patient dragon weaves tales of resilience, its wings brushing against the wisps of time. It teaches that, much like the willow bending but never breaking in the wind, the strength to endure lies in the supple flexibility of the spirit, shaped by the patient hands of experience.</p>
</div>
<div class="content">
<svg>
<clipPath id="clip-9">
<text x="0ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-9 size-3">m</text>
<text x="1ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-9 size-3">o</text>
<text x="2ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-9 size-3">m</text>
<text x="3ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-9 size-3">o</text>
<text x="4ch" y="50%" dominant-baseline="middle" text-anchor="middle" class="font-9 size-3">m</text>
</clipPath>
</svg>
<div class="poster" style="clip-path:url(#clip-9);">
<div class="poster__inner">
<video preload muted autoplay loop>
<source src="img/dragon.webm" type="video/webm" />
<source src="img/dragon.mp4" type="video/mp4" />
</video>
</div>
</div>
</div>
<div class="content content--text">
<h4>Silent narrative</h4>
<p>In the silent narrative woven by the patient dragon, a reminder emerges—that the hands of experience, marked by the passage of time, sculpt the spirit into a vessel of enduring strength, capable of navigating the ever-shifting currents of the cosmic dance.</p>
</div>
<div class="content content--more">
<h2 class="content__title">More you might like</h2>
<div class="card-wrap">
<div class="card">
<a href="https://tympanus.net/Development/OnScrollColumnsRows/" class="card__image" style="background-image:url(https://tympanus.net/codrops/wp-content/uploads/2023/08/OnScrollColumns.jpg)"></a>
<p class="card__title"><a href="https://tympanus.net/Development/OnScrollColumnsRows/">On-Scroll Column & Row Animations</a></p>
</div>
<div class="card">
<a href="http://tympanus.net/Development/Scroll3DGrid/" class="card__image" style="background-image:url(https://tympanus.net/codrops/wp-content/uploads/2023/08/onscroll3dgrid.jpg)"></a>
<p class="card__title"><a href="http://tympanus.net/Development/Scroll3DGrid/">On-Scroll Perspective Grid Animations</a></p>
</div>
<div class="card">
<a href="http://tympanus.net/Development/OnScrollFilter/" class="card__image" style="background-image:url(https://tympanus.net/codrops/wp-content/uploads/2023/07/onscrollfilter_feat-2.jpg)"></a>
<p class="card__title"><a href="http://tympanus.net/Development/OnScrollFilter/">On-Scroll SVG Filter Effect</a></p>
</div>
</div>
</div>
<p class="credits">Made by <a href="https://twitter.com/codrops">@codrops</a></p>
</main>
<script src="js/imagesloaded.pkgd.min.js"></script>
<script src="js/gsap.min.js"></script>
<script src="js/ScrollTrigger.min.js"></script>
<script src="js/lenis.min.js"></script>
<script type="module" src="js/index.js"></script>
</body>
</html>