如何隐藏iPhone上的地址栏? [英] How to hide the address bar on iPhone?

查看:132
本文介绍了如何隐藏iPhone上的地址栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的问题:如何隐藏iPhone上的地址栏?

I have a kind of easy question: how to hide the address bar on iPhone?

我尝试了两种不同的方法:

I tried two different methods so far:


  • 在网页载入时使用Javascript向下滚动一个像素小技巧

  • The scroll down one pixel trick with Javascript on page load

元标记:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /><meta name="apple-mobile-web-app-capable" content="yes" />



$ b

also this:

<meta names="apple-mobile-web-app-status-bar-style" content="black-translucent" />

我完全困惑。任何建议都将非常感激!

I am completly confused. Any advice would be highly appreciated!

PS:哦,我忘了一个非常重要的事情:网页本身不会溢出浏览器窗口,可能是为什么1像素滚动技巧不起作用。

PS: Oh, I forgot a really important thing: the web page itself does not overflow the browser window, probably the reason why the 1 pixel scrolldown trick does not work.

无法使它更大,因为关于设计的命中事情,每个人都可以滚动,但这个页面折叠...: )

Can't make it bigger, since the hit thing about the design, that everyone can scroll, but this page folds... :)

推荐答案

只要点击这个,如果地址栏不隐藏,原因可能只是页面不够长

Just hit this myself, if the address bar is not hiding, the reason may simply be the page is not long enough to scroll.

window.scrollTo(0,1) 

被称为页面必须长于窗口可能发生滚动事件。
只有当滚动甚至发生时,移动safari才会隐藏地址栏。

is called the page MUST be longer than the window so a scrolling event can occur. Only when the scrolling even occurs will mobile safari hide the address bar.

这篇关于如何隐藏iPhone上的地址栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆