2012-11-07 22 views
0

我曾經遇到過一些奇怪的事情。「添加到主屏幕」如何打開沒有瀏覽器組件的網頁?

如果你進入這個鏈接:http://www.pointer4u.co.il/ifleet ,你把它添加到主屏幕上,當你打開應用程序忽略了最低打開瀏覽器並打開它像一個真正的原生應用,我覺得這是驚人的內部應用程序的分配。

現在這個Web應用程序(當添加到主屏幕時)不僅隱藏了UI組件,而且在加載時顯示加載屏幕,而不是常規的瀏覽器加載顯示。

另一個例子,你可以找到Here

他們是怎麼做到的?

+0

該鏈接的後面是什麼?加入我的ipad很長時間了。 –

+0

你可以通過將它添加到主屏幕來解釋你的意思嗎?我看到的唯一選項(翻譯頁面之後)是登錄並保存密碼。 – DavidBriggs

+0

這是一個移動網絡應用程序。我已經添加了另一個博客文章鏈接,聲稱他的移動網絡應用程序也是如此。 –

回答

2
//this is the key for hiding Safari's Top Bar and bottom bar when launch from Home screen short cut. 
    //If this is no, following three lines has no effect. 
    <meta name="apple-mobile-web-app-capable" content="yes" /> 

    <meta name="apple-mobile-web-app-status-bar-style" content="default" /> 
    <link rel="apple-touch-startup-image" href="URL_TO/320_460_loading.png" /> 
    <link rel="apple-touch-startup-image" sizes="640x960" href="URL_TO/640_920_loading.png" /> 
+0

有些探索如何?這似乎解釋了加載部分,但這似乎不同於neilvillareals對元描述的回答。 –

0

史蒂夫·約根森的答案抄在Hiding Safari User Interface Components on iPhone

window.top.scrollTo(0, 1); 

作品在iPhone上,而不是在iPad上。我以

<meta name="apple-mobile-web-app-capable" content="yes" /> 

,並從主屏幕鏈路發射成功隱藏在iPad上(所以大概到處)的瀏覽器組件。我也正在使用

<meta name="viewport" 
    content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> 

我還沒有試過查看瀏覽器組件是否仍然隱藏,如果我省略了視口屬性。

+0

我提供的鏈接不僅隱藏了UI組件,還提供了一個應用程序的加載屏幕,而不是常規的瀏覽器加載。難道他們會以某種方式將其設置爲模擬它的背景嗎? –

相關問題