What is CSS Overscroll Behavior Generator?
overscroll-behavior controls what happens when a scrollable area reaches its boundary. On mobile devices, overscrolling can trigger pull-to-refresh or let scroll bleed from a modal into the page behind it. This property lets you contain or prevent overscroll effects on body, modal, sidebar, and carousel elements.
quickAnswer
Control what happens when a scrollable element reaches its boundary. Use contain to stop scroll chaining while keeping the bounce effect, or none to remove all overscroll effects including pull-to-refresh.
Last updated: 2026-06-11
limitations
- Overscroll-behavior is primarily a mobile concern. Desktop browsers apply minimal or no overscroll effects, so the property has little visible impact on desktop.
- Testing overscroll-behavior on desktop requires device emulation in DevTools because mouse scroll behavior differs significantly from touch gestures.
- overscroll-behavior only controls scroll chaining at the document boundary. It does not prevent scroll propagation within nested scrollable containers that are not at the viewport edge. For internal scroll containment, use overscroll-behavior on the inner container as well.
Sources:MDN Web Docs · W3C Specifications · jquery.app on GitHub
How to use this tool
- Select a scenario that matches where you want to control overscroll behavior.
- Choose the behavior: contain to stop scroll chaining but keep the bounce, or none to prevent all overscroll effects.
- Select the axis if you only want to control horizontal or vertical overscroll separately.
- Copy the CSS and test on a real mobile device to confirm the expected behavior.
What you can use it for
- Prevent pull-to-refresh on a page body while keeping vertical scroll working.
- Stop background page scroll when a modal or drawer is open.
- Contain horizontal scroll in a carousel so it does not trigger back/forward navigation.