How might one force-show the mobile Safari bottom nav bar to show programmatically?

后端 未结 6 1683
迷失自我
迷失自我 2020-12-29 06:13

I have a fixed button for a CTA (call to action) at the bottom of my web page. Scrolling down the page on newer version of iOS, mobile Safari hides the bottom navigation bar

6条回答
  •  佛祖请我去吃肉
    2020-12-29 06:37

    I'm pasting in a solution mentioned at https://benfrain.com/the-ios-safari-menu-bar-is-hostile-to-web-apps-discuss/#comment-119538 in relation to how this is done for https://app.ft.com:

    The trick was adding height: 100% to html, and body, and anywhere in the css where it was using 100vh. No js browser detection needed as it causes no quirks in iOS Chrome, Safari fullscreen, or on Android browsers.

提交回复
热议问题