Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

style(01-scroll): match parallax-depth-of-field demo to Handbook design

matind92abfc6351c
diff --git a/animations/01-scroll-based/parallax-depth-of-field/index.html b/animations/01-scroll-based/parallax-depth-of-field/index.html
index be49ff92..ceb8e6af 100644
--- a/animations/01-scroll-based/parallax-depth-of-field/index.html
+++ b/animations/01-scroll-based/parallax-depth-of-field/index.html
@@ -5,16 +5,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Parallax Depth-of-Field</title>
<style>
+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-700.woff2') format('woff2');font-weight:700;font-display:swap}
+ @font-face{font-family:'Bricolage';src:url('../../../assets/fonts/brico-800.woff2') format('woff2');font-weight:800;font-display:swap}
+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-400.woff2') format('woff2');font-weight:400;font-display:swap}
+ @font-face{font-family:'PlexMono';src:url('../../../assets/fonts/plex-500.woff2') format('woff2');font-weight:500;font-display:swap}
:root {
- --bg: #060a10;
- --ui-bg: #0d1117;
- --ui-border: #21262d;
- --ui-accent: #58a6ff;
- --ui-text: #c9d1d9;
- --ui-muted: #8b949e;
+ --bg: #0b0b0d;
+ --ui-bg: #111114;
+ --ui-border: rgba(255,255,255,.09);
+ --ui-accent: #6ea8ff;
+ --ui-text: #f4f4f2;
+ --ui-muted: #77777e;
+ --disp: 'Bricolage','Arial Narrow',sans-serif;
+ --mono: 'PlexMono',ui-monospace,Menlo,Consolas,monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
- body { background: var(--bg); color: var(--ui-text); font-family: monospace; }
+ body { background: var(--bg); color: var(--ui-text); font-family: var(--mono); -webkit-font-smoothing: antialiased; }
header {
position: fixed; top: 0; left: 0; right: 0; z-index: 100;
@@ -22,8 +28,8 @@
background: linear-gradient(to bottom, rgba(6,10,16,.9), transparent);
pointer-events: none;
}
- header h1 { font-size: clamp(11px, 1.5vw, 14px); letter-spacing: 2px; text-transform: uppercase; }
- header p { font-size: clamp(10px, 1.2vw, 12px); color: var(--ui-muted); margin-top: 4px; }
+ header h1 { font-family: var(--disp); font-weight: 700; font-size: clamp(16px, 2.2vw, 22px); letter-spacing: -.01em; }
+ header p { font-size: clamp(10px, 1.2vw, 12px); color: var(--ui-muted); margin-top: 6px; letter-spacing: .02em; line-height: 1.5; }
.scroll-stage { height: 500vh; position: relative; }
.sticky-viewport { position: sticky; top: 0; height: 100vh; overflow: hidden; }