CSS scroll-margin-block-end Property

❮ Previous Reference Next ❯

Example

.scroller > div:nth-child(2) {
  scroll-margin-block-end: 1rem;
}

.scroller > div:nth-child(3) {
  scroll-margin-block-end: 2rem;
}





1
2
3

Meaning:

The scroll-margin-block-end CSS property defines the margin of the scroll snap area at the end of the block dimension that is used for snapping this box to the snapport.

The scroll snap area is determined by taking the transformed border box, finding its rectangular bounding box (axis-aligned in the scroll container's coordinate space), then adding the specified outsets.

Default value:0
Inherited:No
Animatable:No
Version:CSS3
JavaScript syntax:
object.style.scrollMarginBlockEnd="length|initial|inherit|revert|revert-layer|unset";



Standard Syntax

scroll-margin-block-end: length|initial|inherit|revert|revert-layer|unset;



Browser Support




Status







Property Values

The following table describes the values of this property:

Value Description
length An outset from the block end edge of the scroll container.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element animation-delay property.
revert Reverts the cascaded value of the property from its current value to the value the property
revert-layer Rollback styles to the ones specified in previous cascade layers.
unset Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.



Default CSS Property Values

selectors {
  scroll-margin-block-end: 0;
}
❮ Previous Reference Next ❯