Hide the scrollbar but keep the ability to scroll with native feel

前端 未结 4 1293
庸人自扰
庸人自扰 2021-01-18 08:04

I\'ve searched for an answer to this question and came across hide scrollbar while still able to scroll with mouse/keyboard but the jQuery plugin doesn\'t quite do what I\'d

4条回答
  •  日久生厌
    2021-01-18 08:09

    That is standard browser behavior.

    Taking away scrollbar reduces user-friendliness.


    You can set scrollbar to stay visible all the time with css.

    CSS:

    body {
        overflow-y: scroll;
    }
    

提交回复
热议问题