scroll-margin
尝试一下
Syntax
/* <length> values */
scroll-margin: 10px;
scroll-margin: 1em .5em 1em 1em;
/* Global values */
scroll-margin: inherit;
scroll-margin: initial;
scroll-margin: unset;
Values
<length>
- 从滚动容器的相应边缘开始。
Formal syntax
Specification
Specification | Status | Comment |
---|---|---|
CSS Scroll Snap Module Level 1 scroll-margin |
Candidate Recommendation | Initial definition |
Browser compatibility
BCD tables only load in the browser