overscroll-behavior
overscroll-behavior controls what happens when a scroll container reaches its edge. It helps manage scroll chaining, bounce behavior, and pull-to-refresh interactions.
Overview
overscroll-behavior controls what happens when a scroll container reaches its edge. It helps manage scroll chaining, bounce behavior, and pull-to-refresh interactions.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 63 | 18 | 59 | 16 | 63 | 16 | |
| Other | ||||||
| The overscroll-behavior-block CSS property sets the browser's behavior when the block direction boundary of a scrolling area is reached. | 77 | 79 | 73 | 16 | 77 | 16 |
| CSS property | ||||||
auto | 77 | 79 | 73 | 16 | 77 | 16 |
contain | 77 | 79 | 73 | 16 | 77 | 16 |
none | 77 | 79 | 73 | 16 | 77 | 16 |
| Other | ||||||
| The overscroll-behavior-inline CSS property sets the browser's behavior when the inline direction boundary of a scrolling area is reached. | 77 | 79 | 73 | 16 | 77 | 16 |
| CSS property | ||||||
auto | 77 | 79 | 73 | 16 | 77 | 16 |
contain | 77 | 79 | 73 | 16 | 77 | 16 |
none | 77 | 79 | 73 | 16 | 77 | 16 |
| Other | ||||||
| The overscroll-behavior-x CSS property sets the browser's behavior when the horizontal boundary of a scrolling area is reached. | 63 | 18 | 59 | 16 | 63 | 16 |
| CSS property | ||||||
auto | 63 | 18 | 59 | 16 | 63 | 16 |
contain | 63 | 18 | 59 | 16 | 63 | 16 |
none | 63 | 79 | 59 | 16 | 63 | 16 |
| Other | ||||||
| The overscroll-behavior-y CSS property sets the browser's behavior when the vertical boundary of a scrolling area is reached. | 63 | 18 | 59 | 16 | 63 | 16 |
| CSS property | ||||||
auto | 63 | 18 | 59 | 16 | 63 | 16 |
contain | 63 | 18 | 59 | 16 | 63 | 16 |
none | 63 | 79 | 59 | 16 | 63 | 16 |
auto | 63 | 79 | 59 | 16 | 63 | 16 |
contain | 63 | 79 | 59 | 16 | 63 | 16 |
none | 63 | 79 | 59 | 16 | 63 | 16 |
- This browser only partially implements this feature
- This feature was removed in a later browser version (79)
- The `none` value incorrectly behaves as `contain` (allowing for the elastic bounce effect).
- This browser only partially implements this feature
- This feature was removed in a later browser version (79)
- The `none` value incorrectly behaves as `contain` (allowing for the elastic bounce effect).
- This browser only partially implements this feature
- This feature was removed in a later browser version (79)
- The `none` value incorrectly behaves as `contain` (allowing for the elastic bounce effect).
Syntax
/* Prevent modal scroll chaining */
.modal {
overflow-y: auto;
overscroll-behavior: contain;
}
/* Disable pull-to-refresh */
body {
overscroll-behavior-y: none;
} Live demo
Use cases
Contained scroll panels
Prevent a nested panel from scrolling the whole page when the inner content reaches its boundary.
Modal and drawer content
Keep focused overlays self-contained so background movement feels less accidental.
Cautions
- Over-constraining overscroll can make the interface feel less natural on touch devices.
- Nested scroll behavior should still be understandable and discoverable rather than technically contained but confusing.
Accessibility
- Contained scrolling can help focus, but users still need a clear sense of which region is scrollable.
Related links
Powered by web-features