HTML5 Full Screen Web Apps: No browser bars

前端 未结 6 1772
生来不讨喜
生来不讨喜 2021-01-31 11:29

I am creating a HTML5 web app for mobile devices and was asked to hide the browser nav bar (the back & forward buttons) (typo here prev.). How can I achieve

6条回答
  •  一向
    一向 (楼主)
    2021-01-31 12:15

    EDIT

    New answer

    Much has change since this question was asked. There now is good native support for scrolling, fixed position, and the browser bar of most OS is a lot smaller then back then. Since this is the case I would advice not to resort to scrolling hacks as most sites and answers recommend. Sticking to the rules of the OS will improve the stability, usability and future compatibility of your webapp.

    Old answer

    It's possible for iPhone when somebody saves it as a webapp to the homescreen. This works if you add the proper meta tags.

    For the standard browsermode it's a bit trickier you have to fallback to hacks. Basically the address bar disappears when you scroll (for Iphone and most of the times for android). You can fake this with javascript. Mobile tuts also has a good article on it: http://mobile.tutsplus.com/tutorials/mobile-web-apps/remove-address-bar/, but this only works when content is longer the screen resolution.

提交回复
热议问题