overscroll-behavior

A shorthand for setting how the browser handles reaching the boundary of a scroll area in both directions. It helps stop annoying 'scroll chaining'.

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

/* Usage Example */
.scroll-box {
  /* Stops all scroll chaining in both horizontal and vertical directions */
  overscroll-behavior: contain;
}

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

/* Global values */
overscroll-behavior: inherit;
overscroll-behavior: initial;
overscroll-behavior: revert;
overscroll-behavior: revert-layer;
overscroll-behavior: unset;

This comparison shows how overscroll-behavior works in a real project. View snippet →

Widely available Since 2022 95% global usage

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

63+
59+
16+
18+
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