Ooh I like this demo, making clever use of position: sticky;
:
See the Pen Sticky Photostack by Bennett Feely (@bennettfeely) on CodePen.
There’s also some clever sizing going on in there to create the whitespace around the images, avoiding the need for a wrapper div
per photo.
img {
width: 100vmin;
height: 100vmin;
transform: scale(0.6) rotate(…);
}
Here’s a forked demo that also removes the figure
, stripping it down to its core:
See the Pen Sticky Photostack (Forked) by Bramus (@bramus) on CodePen.