2010-07-12 101 views

回答

5

您無法從Safari應用程序的頂部和底部刪除條。我已經看到了在沒有兩個欄的情況下嵌入Safari的應用程序,但是您無法在頁面中使用Javascript或元數據標記來完成此操作。

UPDATE

有技巧,可以讓你隱藏滾動頁面的地址欄。例如:

<script type="application/x-javascript"> 
    addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); 

    function hideURLbar(){ 
     window.scrollTo(0,1); 
    } 
</script> 
+0

謝謝,我可以刪除頂部欄,但導航欄是一個nono :-(。謝謝反正, – user281300 2010-07-12 16:23:15

+0

謝謝頂部欄刪除比我的更好。 – user281300 2010-07-12 16:29:34

+0

高興幫助一個問題 – Roman 2010-07-12 16:33:27

3

您可以在標題中包含<meta name="apple-mobile-web-app-capable" content="yes" />。 當跳板上的應用程序爲bookmarked時,這將刪除兩個酒吧。

如果您想刪除移動版Safari中的頂欄,請使用代碼Am posted。

+0

謝謝我補充說,以及。不幸的是,當應用程序沒有書籤時,沒有辦法擺脫那個導航欄:( – user281300 2010-07-12 20:24:42

6
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> 

<!-- this is the part responsible for hidding the bottom bar --> 
<meta name="apple-mobile-web-app-capable" content="yes" /> 

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

唯一的問題是,它只在用戶保存到他們的iPhone桌面的鏈接後才起作用。

希望這可以解決您的問題。