How to disable inertial scrolling on body for iOS browsers?

前端 未结 5 683
盖世英雄少女心
盖世英雄少女心 2020-12-09 13:13

I need to disable the inertial scrolling on the body element for iPad, but keep the ability to scroll the page without the inertia.

I have been look

5条回答
  •  -上瘾入骨i
    2020-12-09 13:28

    You can use div with overflow property, it kill smooth iOS scroll

    
      
    long long text...

    Css

    html,
    body {
     height: 100%;
     margin: 0;
     overflow: hidden;
    }
    .scroll {
     overflow: auto;
     height: 100%;
    }
    

    http://jsbin.com/palixi/edit

提交回复
热议问题