手機頁面的 HTML 標簽使用與說明


name="viewport“ 設置窗口(網頁可繪制的區域)

width=“device-width” 應用寬與屏幕的寬一樣的 (height同width)

initial-scale="1.0" 應用程序啟動是縮放尺寸

minmum-scale=”1.0“ 用戶可縮放的最小尺寸,1.0表示不縮放(maxmum-scale同minmum-scale)

user-scalable=”no“ 用戶可用手勢縮放 

target-densitydpi=”device-dpi“ (制定像素密度DPI即dots per inch)device-dpi 為原設備的DPI值不縮放 注 1inch=24.5mm=2.54cm

<meta http-equiv="X-VA-Compatible" content=”IE=edge“> 強制使用ie最新內核模式渲染

<meta name="formate-detection" content="email/telephone=no/yes"> 是否在手機上自動識別電話號,郵箱號

<meta name=”apple-mobile-web-app-capable“ content=“yes”> 是否啟用全屏模式,刪除默認的蘋果工具欄和菜單欄

<meta name="apple-mobile-web-app-status-bar-style" content="black"> 在web app應用下狀態條(屏幕頂條)的顏色

<meta name="apple-touch-fullscreen" content="yes"> 添加到主屏后,全屏顯示

<meta name="MobileOptimized" content=”240“> 瀏覽器不會自動調整文件的大小

 

蘋果 web app

<link rel="apple-touch-icon-precomposed" href="iphone-milanoo.png"> 這個link就是設置web app的放置主屏幕上的icon文件路徑,該路徑需要注意的就是放到網站的文檔根目錄下,但不是服務器文檔根目錄。

<link rel="apple-touch-startup-image" href="milanoo-startup.png"> 這個link 就是設置啟動時候的界面,放置路徑同上,使用路徑同上

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM