A CSS stacked-card layout renders multiple cards as a 3D depth-stack instead of a flat row or grid. These 22 hand-coded designs are ready-to-ship card stacks for testimonial carousels, recently-viewed items, onboarding decks, and pricing comparisons — copy the markup, drop in your content, and ship.
A DNA helix tower — cobalt nucleotide tiles continuously orbit a central axis. Each tile sits at a different height + rotation phase, so the strand reads as a slowly spinning helix.
Apple-Watch–style notification feed — alerts slide in from the top one after another, fading and shrinking as they settle into the pile beneath. The cycle loops so new alerts keep arriving.
Place the cards in a positioned container and offset each one with transform — a small translate, rotate or scale per card — so they appear layered into a deck. Vary z-index so the front card sits on top. The Classic Deck and Perspective Deck demos here show the exact transform values; copy them from the code panel.
How does the card stack spread or fan out on hover?
Give the container a :hover state that re-applies a wider transform to each card — a larger rotation and translation — so the deck fans out. A CSS transition on each card animates the spread smoothly. The Fan Spread and Hover Spread demos are copy-paste examples of this.
Do these stacked card designs need JavaScript?
No — all 22 stacked-card designs are pure CSS. The depth, fan, peel and perspective effects are built entirely with transform, z-index, :hover and transitions. There's nothing to wire up; drop the HTML and CSS in and it works.
How do I do a Tinder-style swipe card stack in CSS?
The visual stack — layered cards with slight offsets — is pure CSS using transforms and z-index. The swipe gesture itself (drag to dismiss) needs JavaScript to track the pointer and animate the card away, but the resting deck and the spring-back styling are CSS. This gallery focuses on the CSS deck layouts that the swipe interaction builds on.
Are these stacked card designs responsive and free?
Yes. Each deck adapts to its container width and works inside a CSS grid or flex layout. All 22 designs are MIT licensed and free for personal and commercial projects, with no attribution required.