Skip to content
Back to the lab

CSS 3D · one boolean

A sticker that peels back on click

The sticker over the footer’s email address. A corner lifts on hover; clicking folds it along its top edge, reveals the back and fades it out.

Source · GitHub

A pure CSS state machine: React toggles one boolean and everything else is a transition on transform and opacity. The fold is rotateX with perspective 520, and the grey back is visible partway through. The lift is done by cross-fading the opacity of two shadow layers; box-shadow itself is not animated, because it repaints on every frame. Clicking again (or using the keyboard) sticks it back. While the sticker is in place, the link under it has tabIndex -1 and aria-hidden, so Tab does not reach it. The large sticker in the corner of the 404 page can be peeled off completely (the crease is a clip-path). Here the sticker covers a sentence; in the footer it covers the email address.

Source

Source files on GitHub:

Back to the lab