How to disable bouncing in html5 fullscreen iphone app?

后端 未结 3 544
感动是毒
感动是毒 2021-01-02 21:44

I want to make html5 fullscreen app. I made a page and added it as an icon to my iphone. I added metatags:

 

        
3条回答
  •  耶瑟儿~
    2021-01-02 22:33

    This will prevent scrolling on the whole page

    document.ontouchmove = function(e) {e.preventDefault()};
    

    In your case, where you want some divs to be scrollable, and some not to, you should be able to catch the event before it gets to the document

    scrollableDiv.ontouchmove = function(e) {e.stopPropagation()};
    

提交回复
热议问题