CSS Scroll Snap is a module of CSS that introduces scroll snap positions, which enforce the scroll positions that a scroll container’s scrollport may end at after a scrolling operation has completed.
Note: The previous version of this module was called Scroll Snap Points and has been deprecated. CSS Scroll Snap is the current implementation.
Reference
CSS Properties on Containers
scroll-snap-type
scroll-snap-stop
scroll-padding
scroll-padding-top
scroll-padding-right
scroll-padding-bottom
scroll-padding-left
scroll-padding-inline
scroll-padding-inline-start
scroll-padding-inline-end
scroll-padding-block
scroll-padding-block-start
scroll-padding-block-end
CSS Properties on Children
scroll-snap-align
scroll-margin
scroll-margin-top
scroll-margin-right
scroll-margin-bottom
scroll-margin-left
scroll-margin-inline
scroll-margin-inline-start
scroll-margin-inline-end
scroll-margin-block
scroll-margin-block-start
scroll-margin-block-end
Guides
Specification
Specification | Status | Comment |
---|---|---|
CSS Scroll Snap Module Level 1 | Candidate Recommendation | Initial definition |
Browser compatibility
The individual property pages detail the browser compatibility situation for Scroll Snap. Note that at the present time Firefox still implements an old version of the specification. Read the guide to browser compatibility for an overview of how to support both the old and new specification.