div
(e.g., main-wrapper
) and apply overflow: auto
, height: 100vh
, and overscroll-behavior: contain
.body
or html
, and use optional JavaScript to prevent bounce in inner scroll areas without blocking mobile pull-to-refresh.To disable scroll bouncing (rubber banding) in Webflow while still allowing pull-to-refresh on mobile, you need a selective CSS and JavaScript approach, as it's not natively controllable within Webflow’s UI. Safari and Android browsers each handle scroll behavior differently, and most prevent fine-grained control over pull-to-refresh.
body
or html
, apply overflow control to a wrapper div that contains all page content.div
the class main-wrapper
) and apply your scroll restrictions there.main-wrapper
, apply the following styles inside Webflow:This setup may look like:
overflow: auto
height: 100vh
overscroll-behavior: contain
(or overscroll-behavior-y: contain
)This prevents iOS Safari from rubber-banding beyond the top and bottom of the content within the wrapper only, without affecting the browser’s default pull-to-refresh behavior that occurs on the body
.
overscroll
on <body>
or <html>
overflow: hidden
or overscroll-behavior: none
on <body>
or <html>
—especially on mobile—because:To control the effect only when wanted (e.g., modals open), you can toggle a class via Webflow interactions or JavaScript:
no-bounce
to your wrapper when needed.no-bounce
class can include:overscroll-behavior: none;
Use Webflow Interactions or custom JavaScript to apply/remove this class dynamically.
If strict bounce prevention is necessary inside scrollable divs (while still allowing body pull-to-refresh):
Add this JavaScript in the Before
Tag section in Webflow:
```js
document.querySelectorAll('.scroll-area').forEach(el => {
el.addEventListener('touchstart', () => {
let top = el.scrollTop === 0;
let bottom = el.scrollHeight - el.scrollTop === el.clientHeight;
if (top) { el.scrollTop = 1;} else if (bottom) { el.scrollTop -= 1;}
});
});
```
Replace .scroll-area
with your scrollable div class (e.g., main-wrapper
if that’s scrollable).
This avoids iOS from bouncing in inner scroll areas without affecting pull-to-refresh on base body
.
To prevent scroll bouncing in Webflow without disabling mobile pull-to-refresh, wrap your content in a div
, apply overflow: auto
and overscroll-behavior: contain
, and avoid scroll restrictions on the body/html
. Use JavaScript only inside inner scroll areas if necessary.