问题
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