How Can I scroll through a div without the scrollbars showing?

前端 未结 1 1785
我在风中等你
我在风中等你 2021-01-05 10:43

I have the following css but the scroll bars are visible. how can I make them invisible (scrollable div without scrollbars)?

.myDiv
{
    height:300px;
    o         


        
相关标签:
1条回答
  • 2021-01-05 11:45
    .myDiv {
      width: 200px;
      height:300px;
      overflow: scroll;
    }
    
    .wrapper {
      width: 183px;
      height: 283px;
      overflow: hidden;
      border: 1px solid black;
    }
    
    
    <div class="wrapper">
      <div class="myDiv">
        floating div content...
      </div>
    </div>
    

    This might work - basically you're placing a smaller div around the one you want and hiding the scroll bars.

    0 讨论(0)
提交回复
热议问题