---
title: CSS Scroll Snap
slug: Web/CSS/CSS_Scroll_Snap
translation_of: Web/CSS/CSS_Scroll_Snap
---
{{CSSRef}}
CSS 滚动快照是 CSS 的模块,它引入滚动捕捉位置,它强制滚动位置,即 {{Glossary("滚动容器")}}的 {{Glossary("滚动端口")}} 在滚动操作完成后可能结束的滚动位置。
注意:此模块的早期版本称为滚动捕捉点,已被弃用。CSS 滚动快照是当前实现。
参考
容器上的 CSS 属性
- {{cssxref("scroll-snap-type")}}
- {{cssxref("scroll-snap-stop")}}
- {{cssxref("scroll-padding")}}
- {{cssxref("scroll-padding-top")}}
- {{cssxref("scroll-padding-right")}}
- {{cssxref("scroll-padding-bottom")}}
- {{cssxref("scroll-padding-left")}}
- {{cssxref("scroll-padding-inline")}}
- {{cssxref("scroll-padding-inline-start")}}
- {{cssxref("scroll-padding-inline-end")}}
- {{cssxref("scroll-padding-block")}}
- {{cssxref("scroll-padding-block-start")}}
- {{cssxref("scroll-padding-block-end")}}
子上的 CSS 属性
- {{cssxref("scroll-snap-align")}}
- {{cssxref("scroll-margin")}}
- {{cssxref("scroll-margin-top")}}
- {{cssxref("scroll-margin-right")}}
- {{cssxref("scroll-margin-bottom")}}
- {{cssxref("scroll-margin-left")}}
- {{cssxref("scroll-margin-inline")}}
- {{cssxref("scroll-margin-inline-start")}}
- {{cssxref("scroll-margin-inline-end")}}
- {{cssxref("scroll-margin-block")}}
- {{cssxref("scroll-margin-block-start")}}
- {{cssxref("scroll-margin-block-end")}}
指南
规范
规范 |
地位 |
评论 |
{{SpecName("CSS Scroll Snap Points")}} |
{{Spec2("CSS Scroll Snap Points")}} |
初始定义 |
浏览器兼容性
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.