Hide scroll bar, but while still being able to scroll

前端 未结 30 3400
悲哀的现实
悲哀的现实 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 05:00

    This will be at the body:

    this is the 1st step
    this is the 2nd step
    this is the 3rd step

    And this is the CSS:

    #maincontainer
    {
        background: grey;
        width: 101%;
        height: 101%;
        overflow: auto;
        position: fixed;
    }
    
    #child
    {
        background: white;
        height:500px;
    }
    

提交回复
热议问题