How to disable rubber band in iOS web apps?

前端 未结 8 1640
夕颜
夕颜 2020-12-01 00:50

This:

$(\'body\').on(\'touchmove\', function(e) { e.preventDefault(); });

Works, but will disable scrolling throughout the whole page, whic

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 01:37

    Did anyone ever consider just using position fixed on the body? That is a nice, simple and native solution. No Javascript needed.

    body{
        position: fixed;
    }
    

提交回复
热议问题