IOS系统中safari浏览器支持的meta和link

作者:管理员 更新时间:2014-04-16 15:21

<meta name="viewport" content="minimal-ui" />

让网页在加载时便可隐藏顶部的地址栏与底部的导航栏。

ios7.1以上支持


<meta name="apple-itunes-app" content="app-id=一个应用id"/>

iOS6 + 显示软件Bar


网站开启对web app程序的支持。

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

状态栏颜色

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

启动时候的界面

<link rel="apple-touch-startup-image" href="/startup.png" />


<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />


IOS中Safari允许全屏浏览:


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

IOS中Safari顶端状态条样式:


<meta content="black" name="apple-mobile-web-app-status-bar-style">

忽略将数字变为电话号码:


<meta content="telephone=no" name="format-detection">

一般情况下,IOS和Android系统都会默认某长度内的数字为电话号码,即使不加也是会默认显示为电话的,so,取消这个很有必要!


IOS中Safari设置保存到桌面图标:


这是IOS中Safari特有的meta,是在你保存某个页面到桌面的时候使用这张图作为桌面图标,so,尺寸和iphone上的一致,是57*57px


<link rel="apple-touch-icon" href="custom_icon.png">


<input type="text" autocapitalize="off" autocorrect="off" />


<link rel="apple-touch-icon" href="/custom_icon.png"/>


<link rel="apple-touch-icon-precomposed" href="/custom_icon.png"/>

系统默认的图标大小是57x57像素,不过一些设备有着不同的分辨率,你可以创建具有不同分辨率的icon:

<link rel="apple-touch-icon" sizes="72x72" href="touch-icon-ipad.png" />

<link rel="apple-touch-icon" sizes="114x114" href="touch-icon-iphone4.png" />

对iPhone和iPod touch而言, 图片是320x460像素,但是,如果你想使用分辨率更高的图片,下边方法可以实现:

<link rel="apple-touch-startup-image" href="/startup-748x1024.jpg"

 media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />

<link rel="apple-touch-startup-image" href="/startup-768x1004.jpg"

 media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />


来源:亦有软件
软件产品Eysln Software Product
亦有公告Eysln Notice
案例中心Eysln Template
知识库Eysln Knowledge Base
工具箱Eysln Toolkit Online