Hide scroll bar, but while still being able to scroll

前端 未结 30 3391
悲哀的现实
悲哀的现实 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:56

    Use:

    CSS

    #subparent {
        overflow: hidden;
        width: 500px;
        border: 1px rgba(0, 0, 0, 1.00) solid;
    }
    
    #parent {
        width: 515px;
        height: 300px;
        overflow-y: auto;
        overflow-x: hidden;
        opacity: 10%;
    }
    
    #child {
        width: 511px;
        background-color: rgba(123, 8, 10, 0.42);
    }
    

    HTML

    
        

提交回复
热议问题