如何定义网站画面的快捷方式图标? [英] How to define the website screen shortcut icon?

查看:124
本文介绍了如何定义网站画面的快捷方式图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到如何让Android使用自定义图标(如图标或使用的iOS应用程序触摸图像),一个网站快捷方式。

I can't find how to make Android use a custom icon (e.g. the favicon or the app-touch image that iOS uses) for a website shortcut.

您可以给我一个提示?

推荐答案

Android和iOS似乎使用主屏幕上的图标相同的符号。

Android and iOS seem to use the same references for the icons on the home screen.

对于HTML链接图标:

<!-- These two are what you want to use by default -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">

<!-- This one works for anything below iOS 4.2 -->
<link rel="apple-touch-icon-precomposed apple-touch-icon" href="apple-touch-icon-precomposed.png">

两种类型之间的区别是,该顶部的两个不具有空间。底部的一个包括两个与之间的空间。空间不被的iOS 4.2+认可。最好的办法是用三种。如果您在空间的限制,只能使用前两名。

The difference between the two types are that the top two don't have a space. The bottom one includes both with a space in between. The space is not recognized by iOS 4.2+. Your best bet is to use all three. If you are limited on space, use only the top two.

规格为:

144×144像​​素的iPad的Retina显示屏。

144 × 144 pixels for an iPad Retina display.

114×114像素的iPhone Retina显示屏。

114 × 114 pixels for an iPhone Retina display.

57×57像素的几乎所有其他

57 × 57 pixels for almost anything else

有一点需要注意是的iOS 4.2+将忽略大小属性,因此你可以将它们链接与出它。我建议把大小图标的文件名中只是为了组织的目的。

One thing to watch out for is that iOS 4.2+ will simply ignore the size attribute, so you can just link them with out it. I'd suggest putting the size within the icon's file name just for organizational purposes.

另外需要注意是,你甚至都不需要包括,为苹果触摸图标上进行链接。如果在HTML中没有定义图标,内部监督办公室将通过在根文件夹中搜索名为以下列文件。安卓的 DOES 的需要他们定义的,所以把它们放在code反正。

Another thing to note is that you don't even need to include the links for the "apple-touch-icon"s. If there is no icons defined in the html, iOS will search through the root folder for files named the following in order. Android DOES need them defined, so put them in the code anyways.

apple-touch-icon-57x57-precomposed.png
apple-touch-icon-57x57.png
apple-touch-icon-precomposed.png
apple-touch-icon.png

这篇关于如何定义网站画面的快捷方式图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆