iPhone X home indicator hides footer in browser

时光毁灭记忆、已成空白 提交于 2020-03-05 00:22:38

问题


my webpage has a footer which is being used for navigation. It works absolutely fine except in iPhone X and above as it's being hidden by the home navigator in the browser.

As I scroll up, it doesn't get hidden as the browser shows it's own bottom bar which doesn't let the footer stay at the bottom of the screen as the webpage is now constrained till the bottom bar of the browser.

Following is the CSS for the footer:

  .footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
   }

Is there any way to find if the home navigator is visible so I can conditionality set the distance from bottom as desired?

.navigatorDetected: {
  bottom: 45px;
}

来源:https://stackoverflow.com/questions/60238044/iphone-x-home-indicator-hides-footer-in-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!