overscroll-behavior-x

Controls what happens when you reach the end of a horizontal scroll zone. It's often used to keep users from accidentally navigating 'back' or 'forward' with swipe gestures.

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

/* Usage Example */
body {
  /* Disables the bounce/pull-to-refresh effect on mobile horizontal swipes */
  overscroll-behavior-x: none;
}

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

/* Global values */
overscroll-behavior-x: inherit;
overscroll-behavior-x: initial;
overscroll-behavior-x: revert;
overscroll-behavior-x: revert-layer;
overscroll-behavior-x: unset;
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