overscroll-behavior-block

A logical property that controls what happens when you reach the end of a scroll area in the block (vertical) direction. It prevents 'scroll chaining' to the parent container.

It is documented as part of the CSS Overscroll Behavior specification.

/* Usage Example */
.modal-body {
  /* Prevents the background page from scrolling when the modal reaches the end */
  overscroll-behavior-block: contain;
}

/* Syntax */
overscroll-behavior-block: contain;
overscroll-behavior-block: none;
overscroll-behavior-block: auto;

/* Global values */
overscroll-behavior-block: inherit;
overscroll-behavior-block: initial;
overscroll-behavior-block: revert;
overscroll-behavior-block: revert-layer;
overscroll-behavior-block: unset;
Widely available Since 2022 94% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2022.

77+
73+
16+
79+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC