服務熱線
153 8323 9821
移動終端瀏覽器默認設置視口的寬度和初始規(guī)模。
最近做的一個移動終端的項目,遇到一個默認設置更改的問題。起初非常懷疑是自己的html寫的有問題。經過一番頁面尺寸的測試之后終于找到問題根源。知道是什么問題就可以找解決的方法了。
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,height=device-height"/>
<meta name="format-detection" content="telephone=no">
在頁面的頭部文件中加入了以上設定就ok了。以下是找到的有關于這些設定的解析。記錄下來避免忘記。
然而這些設定只在移動終端的瀏覽器中有效,非移動終端瀏覽器這些設定是無效的。并且要這些瀏覽器是基于iPhone而來的。初次涉及移動終端的應用,惱人的事情不只這一件呢,呵呵O(∩_∩)O~
Sets whether a web application runs in full-screen mode.
<meta name="apple-mobile-web-app-capable" content="yes"> |
If content yes, the web application runs in full-screen mode; otherwise, it does not. The default behavior is to use Safari to display web content.
You can determine whether a webpage is displayed in full-screen mode using the window.navigator.standalone
Available in iPhone OS 2.1 and later.
Apple extension.
Sets the style of the status bar for a web application.
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
上一篇:WebApp之Meta標簽
下一篇:移動控件的自定義屬性