手机网站和webapp开发默认页面

手机网站和webapp开发默认页面 – wuyt2008的专栏 – 博客频道 – CSDN.NET.

 

 

  1. <html>  
  2. <head>  
  3. <meta charset=“utf-8”>  
  4. <title>无标题文档</title>  
  5. <meta name=“viewport” content=“width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no” />  
  6. <!–<meta name=”viewport” content=”(viewport的宽度,范围从200到10,000,默认为980像素)width=device-width, (初始缩放比例)initial-scale=1.0, (允许用户缩放到的最大比例,范围从0到10.0)maximum-scale=1.0, (允许用户缩放到的最小比例,范围从0到10.0)minimum-scale=1.0, ( 用户是否可以手动缩放,值可以是:①yes、 true允许用户缩放;②no、false不允许用户缩放)user-scalable=no” />–>  
  7.   
  8. <meta http-equiv=“X-UA-Compatible” content=“IE=edge,chrome=1” />  
  9. <!–远以最新的IE版本模式来显示网页–>  
  10.   
  11. <!–如果只是手机网站,不考虑webapp,可以删除该行以下内容–>  
  12. <meta name=“apple-mobile-web-app-capable” content=“yes” />  
  13. <meta name=“apple-mobile-web-app-status-bar-style” content=“black-translucent”>  
  14. <!–启用web app。添加至主屏后,从主屏进入会隐藏地址栏和状态栏–>  
  15. <!–<meta name=”apple-mobile-web-app-status-bar-style” content=”black-translucent” />–>  
  16. <!–默认值为default(白色),可以定为black(黑色)和black-translucent(灰色半透明)。  
  17. 注意: 若值为“black-translucent”将会占据页面px位置,浮在页面上方(会覆盖页面20px高度–iphone4和itouch4的Retina屏幕为40px)。–>  
  18.   
  19. <link rel=“apple-touch-icon” sizes=“72×72” href=“/apple-touch-icon-72×72.png”>  
  20. <link rel=“apple-touch-icon” sizes=“114×114” href=“/apple-touch-icon-114×114.png”>  
  21. <link rel=“apple-touch-icon” href=“/static/images/identity/HTML5_Badge_64.png” />  
  22. <link rel=“apple-touch-icon-precomposed” href=“/static/images/identity/HTML5_Badge_64.png” />  
  23. <!–iOS用rel=”apple-touch-icon”增加高光光亮的图标,rel=”apple-touch-icon-precomposed”设计原图图标,另,android也能读取该图标。这样就能在用户把网页存为书签时,在手机HOME界面创建应用程序样式的图标。该路径需要注意的就是放到将网站的文档根目录下但不是服务器的文档的根目录。图片尺寸可以设定为57*57(px)或者Retina可以定为114*114(px),ipad尺寸为72*72(px)–>  
  24.   
  25. <link rel=“apple-touch-startup-image” href=“milanoo_startup.png” />  
  26. <!–启动界面的图片。该路径需要注意的就是放到将网站的文档根目录下但不是服务器的文档的根目录。官方规定启动界面的尺寸必须为 320*640(px),原本以为Retina屏幕可以支持双倍,但是不支持,图片显示不出来。–>  
  27.   
  28. <!–<meta name=”apple-touch-fullscreen” content=”yes”>–>  
  29. <!–这meta的作用就是删除默认的苹果工具栏和菜单栏。content有两个值”yes”和”no”,当我们需要显示工具栏和菜单栏时,这个行meta就不用加了,默认就是显示。–>  
  30.   
  31. <!–<meta name=”format-detection” content=”telephone=no” />–>  
  32. <!–telephone=no禁止了把数字转化为拨号链接,仅苹果手机和平板,测试了下,好像不管用–>  
  33.   
  34. <!–<meta name=”HandheldFriendly” content=”true” />–>  
  35. <!–针对plam和黑莓手机的设置–>  
  36.   
  37. <!–<meta name=”MobileOptimized” content=”width”>–>  
  38. <!–这个标记,有说是windows mobile的,也有说其它的,但是似乎没怎么用–>  
  39. </head>  
  40. <body>  
  41. </body>  
  42. </html>  

You may also like...