CSS-only scroll-snap carousel
A horizontally scrolling gallery that snaps to each card, with no JavaScript.
Layout, responsive design and modern CSS techniques.
Loading snippets…
14 snippets
A horizontally scrolling gallery that snaps to each card, with no JavaScript.
Turn off or shorten animations for users who ask their system for less motion.
Sensible defaults for box sizing, media, form fonts and text wrapping in a dozen lines.
A full-height page layout with a sticky footer using grid-template-areas.
Show a clear focus outline for keyboard users without drawing it on mouse clicks.
Scale font size smoothly between a minimum and maximum as the viewport grows, with no media queries.
Switch a card from stacked to side-by-side based on the space it has, not the viewport.
Center an element horizontally and vertically using two lines of CSS.
A base button with hover, active, disabled and focus styles that meets minimum target size.
Reserve space for videos and images with aspect-ratio so the page does not jump while loading.
Hide content visually while keeping it available to assistive technology.
Use CSS Grid with repeat(auto-fit, minmax()) so cards wrap automatically at any width.