移動web開發 移動端的配置和優化

1、避免文本字體重置:html

?web

1
2
3
4
5
html{
     -webkit-text-size-adjust:100%;
     -ms-text-size-adjust:100%;
     ext-size-adjust:100%;
}

2、優化瀏覽器視口寬度設置:瀏覽器

?app

1
2
3
  < meta  name = "HandheldFriendly"  content = "true" >
  < meta  name = "MobileOptimized"  content = "320" >
< meta  name = "viewpoint"  content = "width=device-width" >

3、iPhone下全屏模式啓動:工具

?字體

1
2
3
4
5
6
7
8
< meta  name = "app-mobile-web-app-capable"  content = "yes" >
<!--當web應用從界面圖標啓動時,以全屏模式啓動,隱藏瀏覽器上部的工具欄、地址欄和底部的加載狀態欄-->
 
< meta  name = "apple-mobile-web-app-status-bar-style"  content = "yes" >
<!--在瀏覽器的頂部顯示一個狀態欄-->
 
< link  rel = "apple-touch-startup-image"  href = "img/splash.png" >
<!--在程序加載、啓動的時候,顯示一個預加載的頁面,告訴用戶該程序正在加載-->
相關文章
相關標籤/搜索