手机版meta

<!– 视图窗口,移动端特属的标签。 –>
<meta name=”viewport” content=”width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no” />
<!– 是否启动webapp功能,会删除默认的苹果工具栏和菜单栏。 –>
<meta name=”apple-mobile-web-app-capable” content=”yes” />
<!– 这个主要是根据实际的页面设计的主体色为搭配来进行设置。 –>
<meta name=”apple-mobile-web-app-status-bar-style” content=”black” />
<!– 忽略页面中的数字识别为电话号码,email识别 –>
<meta name=”format-detection”content=”telephone=no, email=no” />
<!– 启用360浏览器的极速模式(webkit) –>
<meta name=”renderer” content=”webkit”>
<!– 避免IE使用兼容模式 –>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<!– 针对手持设备优化,主要是针对一些老的不识别viewport的浏览器,比如黑莓 –>
<meta name=”HandheldFriendly” content=”true”>
<!– 微软的老式浏览器 –>
<meta name=”MobileOptimized” content=”320″>
<!– uc强制竖屏 –>
<meta name=”screen-orientation” content=”portrait”>
<!– QQ强制竖屏 –>
<meta name=”x5-orientation” content=”portrait”>
<!– UC强制全屏 –>
<meta name=”full-screen” content=”yes”>
<!– QQ强制全屏 –>
<meta name=”x5-fullscreen” content=”true”>
<!– UC应用模式 –>
<meta name=”browsermode” content=”application”>
<!– QQ应用模式 –>
<meta name=”x5-page-mode” content=”app”>
<!– windows phone 点击无高光 –>
<meta name=”msapplication-tap-highlight” content=”no”>

pc端调整页面兼容代码
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”renderer” content=”webkit|ie-comp|ie-stand”/>

放在body里面
兼容浏览器
<!–[if lt IE 9]>
<p class=”chromeframe”>您使用的IE浏览器版本过低,为获得更佳浏览体验,<a href=”http://windows.microsoft.com/”>建议升级您的IE浏览器</a>,或使用<a href=”http://www.google.com/chromeframe/?redirect=true”>Google Chrome</a>、<a href=”http://www.firefox.com.cn/”>Firefox</a>等高级浏览器,将会得到更好的体验!</p>
<![endif]–>

欢迎分享本文,转载请保留出处:前端ABC » 手机版meta

分享到:更多 ()

发表评论 0