Hide scroll bar, but while still being able to scroll

前端 未结 30 3392
悲哀的现实
悲哀的现实 2020-11-21 04:22

I want to be able to scroll through the whole page, but without the scrollbar being shown.

In Google Chrome it\'s:

::-webkit-scrollbar {
    display:         


        
30条回答
  •  花落未央
    2020-11-21 04:49

    The following was working for me on Microsoft, Chrome and Mozilla for a specific div element:

    div.rightsidebar {
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    div.rightsidebar::-webkit-scrollbar { 
        width: 0 !important;
    }
    

提交回复
热议问题