Disabling mouse scrolling

后端 未结 4 1217
后悔当初
后悔当初 2020-12-10 18:11

I have a page with a textbox in it. When I scroll the textbox to the bottom, the document will scroll after it. How to disable mouse scrolling for the document but enable sc

4条回答
  •  没有蜡笔的小新
    2020-12-10 18:22

    You could try the following

     
    

    You could also do this in CSS if you choose to do so using the following;

    body{
    overflow: hidden;
    }
    

    Off the top of my head I came up with that. If you don't want them to scroll you could also add some stuff to your CSS class like the following

    Hope this helps!

    Happy Coding! ;)

提交回复
热议问题