Scroll inside the frame. The shot stays paused.
The prompt
Build a scroll-zoomed panel. ## Look Sticky panel, top 12vh, height 70vh, width min(860px, 100% - 32px), radius 20px, border 1px #7c6cff, background linear-gradient(160deg, #1c1733, #101018 60%). Headline #f2f2f7. Page #08080d. Runway 220vh. ## Behavior Scale from 0.62 to 1 and opacity from 0.55 to 1 as progress goes from 0 to 1. Include function mountScroll. ## Design tokens - Border #7c6cff; gradient #1c1733 to #101018; page #08080d. ## Motion - Scrubbed to scroll. No timed zoom. ## Constraints - Single self-contained HTML file. No libraries. - Honor prefers-reduced-motion: reduce by skipping the loop and leaving a readable static frame - Readable at 390px width with no horizontal page scroll
The code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body {
background: #08080d; color: #f2f2f7; font-family: Inter, system-ui, sans-serif;
min-height: 100vh; overflow-x: hidden;
}
.hint { position: absolute; left: 16px; top: 16px; z-index: 5; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8a99; }
.runway { height: 220vh; } #panel { position: sticky; top: 12vh; height: 70vh; width: min(860px, calc(100% - 32px)); margin: 0 auto; border-radius: 20px; background: linear-gradient(160deg, #1c1733, #101018 60%); border: 1px solid #7c6cff; display: grid; place-items: center; } h2 { font-size: clamp(28px, 5vw, 56px); letter-spacing: -0.04em; }
@media (max-width: 420px) {
.hint { font-size: 10px; letter-spacing: 0.08em; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
</style>
</head>
<body>
<div class="runway"><div id="panel"><h2>Closer.</h2></div></div>
<script>
var reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
function layout(p) {
var panel = document.getElementById("panel");
var scale = 0.62 + p * 0.38;
panel.style.transform = "scale(" + scale + ")";
panel.style.opacity = String(0.55 + p * 0.45);
}
function mountScroll() {
function read() {
var max = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) - window.innerHeight;
var p = max > 0 ? window.scrollY / max : 0;
if (p < 0) p = 0;
if (p > 1) p = 1;
layout(p);
}
layout(reduce ? 1 : 0);
if (!reduce) window.addEventListener("scroll", read, { passive: true });
}
mountScroll();
</script>
</body>
</html>About this effect
One rounded panel starts at scale 0.62 and reaches 1 at the end of the runway, with a violet frame that fades. No photography, just type and a gradient.
Similar effects
Parallax Layers
Pinned dusk landscape where three SVG ridgelines drift at different speeds as you scroll.
Stacked Scroll Gallery
Vertical scroll lifts a column of cards into place, scrubbed to the scrollbar.
Scroll Reveal Cards
Grid cards fade up 40px into view with a buttery 0.08s stagger as you scroll.