热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

移动端meta行的汇总-

<metaname"viewport"content"widthdevice-width,initial-scale1,user-scalableno,minimal-ui">width:viewport的宽度(范围从200到10,000,默认为980像素)height:viewport的高度(范围从223到10,000
<meta name="viewport" 
cOntent="width=device-width, initial-scale=1, user-scalable=no, minimal-ui" />

 
width: viewport 的宽度 (范围从 200 到 10,000 ,默认为 980 像素 )

height: viewport 的高度 (范围从 223 到 10,000 )

initial-scale: 初始的缩放比例 (范围从>0到 10 )

minimum-scale: 允许用户缩放到的最小比例

maximum-scale: 允许用户缩放到的最大比例

user-scalable: 用户是否可以手动缩放

<meta name="apple-mobile-web-app-capable" cOntent="yes" />

<meta name="renderer" cOntent="webkit">

<meta http-equiv="X-UA-Compatible" cOntent="IE=edge">

<meta name="HandheldFriendly" cOntent="true">

<meta name="MobileOptimized" cOntent="320">

<meta name="screen-orientation" cOntent="portrait">

<meta name="x5-orientation" cOntent="portrait">

<meta name="full-screen" cOntent="yes">

<meta name="x5-fullscreen" cOntent="true">

<meta name="browsermode" cOntent="application">

<meta name="x5-page-mode" cOntent="app">

<meta name="msapplication-tap-highlight" cOntent="no">

1. apple-touch-icon

如果 apple-mobile-web-app-capable 设置为 yes 了,

那么在苹果机的safari上可以通过添加到主屏按钮将网站添加到主屏幕上。

而设置相应 apple-touch-icon 标签,则添加到主屏上的图标就会使用我们指定的图片。

2. apple-touch-startup-image

基于 apple-mobile-web-app-capable 设置为 yes ,

可以为WebApp设置一个类似NativeApp的启动画面。

和 apple-touch-icon 不同,

apple-mobile-web-app-capable 不支持sizes属性,

要使用media来加载不同的启动画面。

// iPhone

// iPhone Retina
"apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image" />

以上就是移动端meta行的汇总的详细内容,更多请关注 第一PHP社区 其它相关文章!


推荐阅读
author-avatar
何卫先生
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有