CSS scroll-snap-align property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxNot supported
Internet ExplorerNot supported
EdgeNot supported
OperaNot supported
Description
CSS scroll-snap-align represents the snap position of a box's snap area within container's snapport.
The snap area is the yellow rectangular box while red box represents container's snapport.
Syntax
scroll-snap-align : none | start | end | center
Property values
start
-
The start side of the snap area (child element) touches the start side of container's snapport.
- Try it
scroll-snap-align: start; end
-
The end side of the snap area (child element) touches the end side of container's snapport.
- Try it
scroll-snap-align: end; center
-
The snap area (child element) is centered within container's snapport.
- Try it
scroll-snap-align: center;
Applicable to
It applies to scroll containers.