CSS Scroll Snap
CSS Scroll Snap is a module of CSS that introduces scroll snap positions, which enforce the scroll positions that a scroll container’s scrollport (en-US) may end at after a scrolling operation has completed.
Примечание: 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
(en-US)scroll-padding
(en-US)scroll-padding-top
(en-US)scroll-padding-right
(en-US)scroll-padding-bottom
(en-US)scroll-padding-left
(en-US)scroll-padding-inline
(en-US)scroll-padding-inline-start
(en-US)scroll-padding-inline-end
(en-US)scroll-padding-block
(en-US)scroll-padding-block-start
(en-US)scroll-padding-block-end
(en-US)
CSS Properties on Children
scroll-snap-align
(en-US)scroll-margin
(en-US)scroll-margin-top
(en-US)scroll-margin-right
(en-US)scroll-margin-bottom
(en-US)scroll-margin-left
(en-US)scroll-margin-inline
(en-US)scroll-margin-inline-start
(en-US)scroll-margin-inline-end
(en-US)scroll-margin-block
(en-US)scroll-margin-block-start
(en-US)scroll-margin-block-end
(en-US)
Guides
Specification
Specification | Status | Comment |
---|---|---|
CSS Scroll Snap Module Level 1 | Кандидат в рекомендации | 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 (en-US) for an overview of how to support both the old and new specification.