Scrolling and Snapping

A box with overflow: auto or scroll (Overflow) is a scroll container, tuned with:

Scroll snapping makes a scroller settle on defined positions, the CSS-only carousel. Set scroll-snap-type on the container (an axis plus mandatory or proximity) and scroll-snap-align on the children; scroll-snap-stop: always stops a fast swipe from skipping slides.

A horizontal snap carouselCSS
.carousel {
  display: flex; gap: 1rem; overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;       /* snap 1rem inside the edge */
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
.carousel > figure { flex: 0 0 85%; scroll-snap-align: start; scroll-snap-stop: always; }

For full-page sections of varying height prefer proximity, so the browser never yanks readers away from text they are still reading.