Last active
December 20, 2015 16:29
-
-
Save zikkeung/6161482 to your computer and use it in GitHub Desktop.
ios 相关
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="apple-touch-icon" href="/apple-touch-icon.png"/> | |
<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png"/> | |
以上你只能选其一,二者的区别在于如果使用apple-touch-icon,那么iOS会给icon加上一些NB的效果, | |
包括圆角,阴影,反光。如果使用apple-touch-icon-precomposed则iOS不会加这个效果。 | |
如果你的网站也要可以在Ipad上访问,那么你还要针对不同的设备准备不同尺寸的icon, | |
你可以通过sizes属性来指定icon的尺寸: | |
<link rel="apple-touch-icon" href="touch-icon-iphone.png" /> | |
<link rel="apple-touch-icon" sizes="72x72" href="touch-icon-ipad.png" /> | |
<link rel="apple-touch-icon" sizes="114x114" href="touch-icon-iphone-retina.png" /> | |
<link rel="apple-touch-icon" sizes="144x144" href="touch-icon-ipad-retina.png" /> | |
如果你不指定size属性,那么默认为57x57,我们可以看到ipad所需icon的尺寸是72x72, | |
retina屏幕的iphone所需的尺寸是114x114,retina屏幕的ipad所需的尺寸是144x144。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iPhone 1、3G、3GS,iPod Touch 1、2、3 | |
320 x 480 | |
iPhone 4、4S,iPod Touch 4 | |
Retina 640 x 960 | |
iPad 1,2,mini | |
768 x 1024 | |
New iPad,iPad4 | |
1536 x 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="apple-touch-startup-image" href="/startup.png"> | |
在iPhone和iPod touch上,尺寸大小必须为320 x 460。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
你可以通过window.navigator.standalone来检测当前是否是standalone模式。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment