scroll-snap-align

Used on children within a scroll-snap container to define which part of the element should snap to the container. You can snap to the start, center, or end of the element.

Quick example

.carousel-item {
  scroll-snap-align: center;
  /* centers each item in the viewport when scrolling stops */
}

Quick facts

Initial value
none
Inherited
No
Applies to
all elements
Animation type
discrete

Values

nonestartendcenter

scroll-snap-align Browser Support

Widely available Since 2020 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

Safe to use without fallbacks.

69+
68+
11+
79+
ESC