CSS · Properties — CSS Scroll Snap

scroll-margin-block

The CSS scroll-margin-block property. Initial value: scroll-margin-block-start,scroll-margin-block-end. Not inherited.

Syntax
scroll-margin-block: <length>{1,2}

Example

Try it

Notes

Media: visual. Applies to: allElements. Computed value: scroll-margin-block-start,scroll-margin-block-end.

More in this group

scroll-initial-target scroll-margin scroll-margin-block-end scroll-margin-block-start scroll-margin-bottom scroll-margin-inline scroll-margin-inline-end scroll-margin-inline-start

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.

Open the course