overcaffeinated
overcaffeinated

Reputation: 53

Prevent mousewheel from scrolling past elements

I have a wrapper div which includes several children all of which are 100%/100vh height. I want the scrollwheel to stop at each child element so that the user won't be able to use the mousewheel to scroll at the end of the page bypassing some of the child elements.

Any help should be appreciated.

Upvotes: 1

Views: 65

Answers (1)

HelloWorld
HelloWorld

Reputation: 21

You can try scroll-snap-type and scroll-snap-stop:always but im not sure if you are looking for that or to completely disable scrolling at certain child element.

Upvotes: 1

Related Questions