CSS · Properties — CSS Scroll Snap
scroll-margin
The CSS scroll-margin property. Initial value: scroll-margin-bottom,scroll-margin-left,scroll-margin-right,scroll-margin-top. Not inherited.
Syntax
scroll-margin: <length>{1,4}Example
Try it
Notes
Media: visual. Applies to: allElements. Computed value: scroll-margin-bottom,scroll-margin-left,scroll-margin-right,scroll-margin-top.
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.