DevToolBox

CSS Overscroll Behavior Generator

Control scroll chaining and bounce effects with overscroll-behavior

Settings

Behavior Explanations

auto: Default browser behavior with scroll chaining and bounce effects
contain: Prevents scroll chaining to parent, keeps bounce effects
none: Prevents both scroll chaining and bounce effects

CSS Code

.element {
  overscroll-behavior-x: auto;
  overscroll-behavior-y: contain;
}

Interactive Demo

Scrollable Area

Try scrolling in both directions and notice the overscroll behavior at the edges.

Line 1 - Scroll to see the overscroll behavior
Line 2 - Scroll to see the overscroll behavior
Line 3 - Scroll to see the overscroll behavior
Line 4 - Scroll to see the overscroll behavior
Line 5 - Scroll to see the overscroll behavior
Line 6 - Scroll to see the overscroll behavior
Line 7 - Scroll to see the overscroll behavior
Line 8 - Scroll to see the overscroll behavior
Line 9 - Scroll to see the overscroll behavior
Line 10 - Scroll to see the overscroll behavior
Line 11 - Scroll to see the overscroll behavior
Line 12 - Scroll to see the overscroll behavior
Line 13 - Scroll to see the overscroll behavior
Line 14 - Scroll to see the overscroll behavior
Line 15 - Scroll to see the overscroll behavior
Line 16 - Scroll to see the overscroll behavior
Line 17 - Scroll to see the overscroll behavior
Line 18 - Scroll to see the overscroll behavior
Line 19 - Scroll to see the overscroll behavior
Line 20 - Scroll to see the overscroll behavior

Current: overscroll-behavior-x: auto, overscroll-behavior-y: contain

Common Use Cases

  • Modal/dialog scroll containers
  • Nested scrollable areas
  • Mobile-friendly scroll experiences
  • Preventing pull-to-refresh