2014-08-28——移动端web开发,基本Meta标签

1、<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />

  作用:设置默认尺寸,对缩放进行限制。

2、<meta name="apple-touch-fullscreen" content="yes">

  作用:添加到主屏幕“后,全屏显示

3、<meta name="apple-mobile-web-app-capable" content="yes" />

  作用:删除默认的苹果工具栏和菜单栏。

4、<meta name=”apple-mobile-web-app-status-bar-style” content=black” />

  作用:控制状态栏显示样式。默认值为default(白色),可以定为black(黑色)和black-translucent(灰色半透明)。
  注意:若值为“black-translucent”将会占据页面px位置,浮在页面上方(会覆盖页面20px高度,iphone4和itouch4的Retina屏幕为40px)。

5、<link rel="apple-touch-icon-precomposed" href="http://spion.blog.163.com/blog/iphone_milanoo.png" />

  作用:设置web app的放置主屏幕上icon文件路径。图片尺寸可以设定为57*57(px)或者Retina可以定为114*114(px),ipad尺寸为72*72(px)。

6、<meta name="format-detection" content="telephone=no" />    //禁止把数字转化为拨号链接。
   <meta name="format-detection" content="email=no" />    //告诉设备不识别邮箱,点击之后不自动发送。
     <meta name="format-detection" content="address=no">    //禁止跳转至地图。

  说明:format-detection翻译成中文的意思是“格式检测”。

posted @ 2014-08-28 21:54  bugong  阅读(507)  评论(0编辑  收藏  举报