Understanding Favicon

Favicon

简介

Favicon : 是favorites icon 的缩写,被称为website icon
. page icon. urlicon

最初定义一个favicon的方法是将一个名为“favicon.ico” 的文件至于web服务器的根目录下,后来出现了一种更为灵活的方法,即使用HTML来为任何一个网页指示其图标所存储的位置。这种方法是通过在页面的部分添加两个link组件来实现的。这样,任何一个适当大小的(16×16像素或更大)的图像都可以用作favicon。尽管如此,多数情况下仍然使用ICO格式。其他网页浏览器现在也支持PNG(便携式网络图片)格式,和GIF(图形交换格式)动画图像格式。

给站点添加自定义图标

<!-- third-generation iPad with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="">
<!-- iPhone with high-resolution Retina display: -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="">
<!-- first- and second-generation iPad: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="">
<!-- non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="">
<!-- basic favicon -->
<link rel="shortcut icon" href="">

## References

What`s the head? Metadata in HTML

猜你喜欢

转载自www.cnblogs.com/rosendolu/p/10015986.html