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

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