How the flip works
Each pair of digits is a card split across the middle. When its value changes, the top half folds down over the old number and the new one unfolds below, in about half a second. Only the cards that actually changed move: on a clock with seconds the last card flips every second, the minutes once a minute.
The animation is plain CSS, so it costs almost nothing and needs no library. If the visitor’s device asks for reduced motion, the cards simply change without folding.
Fit it to your page
Hide the seconds for a two-card clock that only moves once a minute — a good choice for a header. The accent colour paints the cards and the digit colour is picked automatically for contrast; the background, corner radius and shadow are yours to set. In 12-hour mode a small AM/PM marker sits beside the cards.
Questions
Does the flip clock keep running in a background tab?
It pauses its updates while the tab is hidden and jumps straight to the correct time when the tab is shown again, without replaying the flips it missed.
Is there a flip countdown?
Not yet. The countdown widget uses plain digits; the flip design is a clock only.