How to remove Address Bar in Safari in iOS?

前端 未结 4 607
闹比i
闹比i 2020-12-05 08:30

Old trick with window.scrollTo(0,1); doesn\'t work. And even worse, the address bar moves only a bit and gets stuck halfway out sometimes.

4条回答
  •  醉梦人生
    2020-12-05 08:56

    i guess the code should still work..

    anyways here is the correct way to tell mobile safari that you want the full screen: click me

    e.g. use

    
    

    EDIT

    Apple uses a new mobile-ui property to display a minimal UI in safari:

    A property, minimal-ui, has been added for the viewport meta tag key that allows minimizing the top and bottom bars on the iPhone as the page loads. While on a page using minimal-ui, tapping the top bar brings the bars back. Tapping back in the content dismisses them again.

    use it like this:

    
    

    source: https://www.perpetual-beta.org/weblog/ios-7-dot-1-mobile-safari-minimal-ui.html

提交回复
热议问题