Android browser bottom control bar overlays content

╄→尐↘猪︶ㄣ 提交于 2021-01-27 05:50:44

问题


I have a fix positioned element at the bottom of the screen which works perfectly except for the Android browser where the bottom control bar overlays my element. It doesn't even trigger the window resize event to try and work with that. iOS Safari also has the bottom control bar but it pushes my element correctly and it doesn't overlay it.

I'm open to any suggestion.


回答1:


You can try the new display: fullscreen

https://developers.google.com/web/updates/2017/04/nic58#fullscreen

When Progressive Web Apps are launched from the Android home screen, they launch in a standalone app-like mode that hides the omnibox. This helps create an engaging user experience, and frees up screen space for content.

However, for even more immersive experiences like games, video players, or other rich content, mobile UI elements such as the system bars can still be a distraction and take up valuable pixels that you may want.

Now you can make your Progressive Web App feel fully immersive by setting display: fullscreen in your web app manifest.

When your app is launched from the home screen, all non-app mobile UI elements will be hidden.



来源:https://stackoverflow.com/questions/27357033/android-browser-bottom-control-bar-overlays-content

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