Always want to see iOS Safari menu bar

Asked 1 years ago, Updated 1 years ago, 88 views

I have a question about creating a website for smartphones.

I'm thinking of placing a fixed navigation at the bottom of the screen, but when I tap the bottom of the screen with iOS Safari, a menu bar such as a back button appears.

This will only bring up the menu bar in the first operation, but you have to tap it again to navigate. I have considered not to let the menu appear in the minimal-ui setting in viewport, but I would like to keep the menu.

Therefore, I hope that the menu bar will always be displayed even if I scroll up and down the page in Safari on iOS, but if you know how to implement it, please let me know.

ios css html safari

2022-09-30 20:30

1 Answers

The minimal-ui is not supported by iOS8, so you should stop using it.
(*Only works under iOS 7.1 to iOS 8…)…)
As a prerequisite, Safari on iOS shrinks and hides when it is out of scroll top:0px.

Since it is in the CSS category, the following number 1 implementation may be easy, but there are two ways I can come up with it.
1: Limit the display area with iframe, etc., and scroll in iframe.
2: Create a wrapper to cover the content, get the display area in JavaScript (window.innerHeight), and then reflect it in the wrapper. Scroll inside the wrapper.


2022-09-30 20:30

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.