also called before/after · juxtapose
One image clipped over another, the clip driven by pointer position. Keep both layers exactly registered or the comparison lies. The two photographs of each place were taken from the same spot but never framed exactly alike, so the later one is scaled, turned and shifted until its rock edges sit on the earlier one’s, and both are cropped to the window they share. The divider is a native range input underneath: drag it, click anywhere, or use the arrow keys.
How it is built
.then { clip-path: inset(0 calc(100% - var(--x) * 1%) 0 0) } /* the earlier picture, cut at the divider */
.now img { transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(var(--s)) }
/* --s, --rot, --tx, --ty: measured once, so the later picture's rock lies on the earlier's */
input[type=range] → --x /* the divider is a real slider */In full, on GitHub index.html showcase.css showcase.js
Photographs — Glacier National Park’s repeat photography and archives, public domain, via Wikimedia Commons: Grinnell 1910, Grinnell 2025, Jackson 1914, Jackson 2020, Sperry 1907, Sperry 2023, Road 1941, Road 2025, Boulder 1932, Boulder 1988. Glacier counts — USGS, Status of glaciers in Glacier National Park.









