scroll-margin-bottom

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Die Eigenschaft scroll-margin-bottom definiert den unteren Randbereich des Scroll-Snap-Bereichs, der verwendet wird, um dieses Element an den Snapport anzuschnappen. Der Scroll-Snap-Bereich wird bestimmt, indem der transformierte Rahmenrand des Elements erfasst, dessen rechteckige Umrandungsbox berechnet (achsen-ausgerichtet im Koordinatenraum des Scroll-Containers) und dann die angegebenen Randergänzungen hinzugefügt werden.

Probieren Sie es aus

Syntax

css
/* <length> values */
scroll-margin-bottom: 10px;
scroll-margin-bottom: 1em;

/* Global values */
scroll-margin-bottom: inherit;
scroll-margin-bottom: initial;
scroll-margin-bottom: revert;
scroll-margin-bottom: revert-layer;
scroll-margin-bottom: unset;

Werte

<length>

Ein Abstand von der unteren Kante des Scroll-Containers.

Formale Definition

Anfangswert0
Anwendbar aufalle Elemente
VererbtNein
Berechneter Wertwie angegeben
Animationstypby computed value type

Formale Syntax

scroll-margin-bottom = 
<length>

Spezifikationen

Specification
CSS Scroll Snap Module Level 1
# margin-longhands-physical

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
scroll-margin-bottom

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Uses a non-standard name.
Has more compatibility info.

Siehe auch