Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (52 loc) · 2.38 KB
/
Copy pathindex.html
File metadata and controls
52 lines (52 loc) · 2.38 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>scroll-anim-fallback — demos</title>
<style>
:root { color-scheme: light dark; --ink: #14161a; --paper: #fbfaf7; }
@media (prefers-color-scheme: dark) { :root { --ink: #eceff4; --paper: #14161a; } }
body {
margin: 0; padding: 4rem 1.5rem 8rem;
background: var(--paper); color: var(--ink);
font: 16px/1.6 system-ui, sans-serif;
}
main { max-width: 42rem; margin: 0 auto; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 .5rem; letter-spacing: -0.02em; }
p { opacity: .8; }
ul { list-style: none; padding: 0; display: grid; gap: 1rem; margin: 2rem 0; }
li a {
display: block; padding: 1.25rem 1.5rem; border-radius: .9rem; text-decoration: none;
color: inherit;
border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
background: color-mix(in srgb, var(--ink) 5%, transparent);
}
li a:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
strong { display: block; font-size: 1.05rem; }
small { opacity: .7; }
code { font-family: ui-monospace, monospace; }
</style>
</head>
<body>
<main>
<h1>scroll-anim-fallback demos</h1>
<p>
Run <code>npm run build && node examples/build.mjs</code> first, then open
any demo. Append <code>?forceFallback=1</code> to any of them to exercise the
fallback path even where native support exists.
</p>
<ul>
<li><a href="reveal-on-enter.html"><strong>Reveal on enter</strong><small><code>view()</code> over the <code>entry</code> range → IntersectionObserver fallback</small></a></li>
<li><a href="parallax-hero.html"><strong>Parallax hero</strong><small><code>view()</code> over <code>cover</code> → progress fallback driven by scroll + rAF</small></a></li>
<li><a href="reading-progress.html"><strong>Reading progress bar</strong><small><code>scroll(root block)</code> → progress fallback over the document scroller</small></a></li>
</ul>
<p><small id="support"></small></p>
</main>
<script>
document.getElementById('support').textContent = CSS.supports('animation-timeline: scroll()')
? 'This browser supports animation-timeline natively — use ?forceFallback=1 to see the fallback.'
: 'This browser has no native animation-timeline support, so the demos already run the fallback.';
</script>
</body>
</html>