CSS
CSS-only scroll-snap carousel
A horizontally scrolling gallery that snaps to each card, with no JavaScript.
Loading snippets…
7 snippets
A horizontally scrolling gallery that snaps to each card, with no JavaScript.
A full-height page layout with a sticky footer using grid-template-areas.
Center an element horizontally and vertically using two lines of CSS.
Reserve space for videos and images with aspect-ratio so the page does not jump while loading.
Use CSS Grid with repeat(auto-fit, minmax()) so cards wrap automatically at any width.
Clip long text to one line or N lines with an ellipsis using text-overflow and line-clamp.
Switch themes by redefining variables under prefers-color-scheme, with a manual override attribute.