CSS Scroll Snap - CSS: Cascading Style Sheets 编辑
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
Specifications
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. Read the guide to browser compatibility for an overview of how to support both the old and new specification.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论