这张图片叫做'100',它是一个方形的小.ico
文件,这是图标的标准文件类型.您也可以使用.png
或.gif
,但您应该遵循标准以获得更好的兼容性.
要为您的网站设置一个,您应该:
制作一张你的徽标的正方形图像(最好是32x32或16x16像素,据我所知没有最大尺寸*),并将其转换为.ico
文件.你可以在Gimp,Photoshop(在plugin的帮助下)或者像Favicon.cc或RealFaviconGenerat或这样的网站上做到这一点.
然后,您可以通过两种方式设置它:
A) 将其放在网站的root folder/direct或y页(index.html
页旁边)
或
B) 链接到你网站上每.html
个文件的<head></head>
个标签之间,如下所示:
<head>
<link rel="sh或tcut icon" type="image/x-icon" href="favicon.ico" />
</head>
If you want to see the favicon
from any website, just write www.url.com/favicon.ico
and you'll (probably) see it. Stackoverflow's favicon is 16x16 pixels and Wikipedia is 32x32.
*: There's even a browser problem with no filesize limit. You could easily crash a browser with an exceedingly large favicon, m或e info here