How to disable scrolling on mobile CSS?
And it is simply by adding the CSS property overflow: hidden; on the element you want to prevent the scroll.
How do I get rid of scroll effect?
onscroll function. The event window. onscroll is fired when the window has been scrolled, thus overriding and setting the function to a fixed value will disable the scroll effect for your webpage.