本文翻译自:Favicon dimensions?
I have a favicon with the dimensions of height=26px / width=20px named favicon.png 我有一个尺寸为height = 26px / width = 20px的图标,名为favicon.png
<link href=http://www.example.com/images/favicon.png rel="shortcut icon" />
However, in my browser, my favicon.png is all distorted. 但是,在我的浏览器中,我的favicon.png都是扭曲的。
Question : Is my favicon.png supposed to be a particular size? 问题 :我的favicon.png应该是特定尺寸吗? Also, can I use a non-standard size/dimension and if so, how? 另外,我可以使用非标准尺寸/尺寸,如果是,如何使用?
#1楼
参考:https://stackoom.com/question/9W3w/Favicon尺寸
#2楼
A favicon for a website normally has to be a *.ico file and can be 32x32 or 16x16. 网站的favicon通常必须是* .ico文件,可以是32x32或16x16。 Using a non-standard size will not work in all browsers, and will appear all distorted like you saw yourself. 使用非标准尺寸将无法在所有浏览器中使用,并且会像您看到的那样显得扭曲。 Try and convert that image using this site: http://www.favicon.cc/ and then try and use it? 尝试使用此站点转换该图像: http : //www.favicon.cc/然后尝试使用它?
#3楼
the format for the image you have chosen must be 16x16 pixels or 32x32 pixels, using either 8-bit or 24-bit colors. 您选择的图像格式必须为16x16像素或32x32像素,使用8位或24位颜色。 The format of the image must be one of PNG (a W3C standard), GIF, or ICO. 图像格式必须是PNG(W3C标准),GIF或ICO之一。 - How to Add a Favicon to your Site - QA @ W3C - 如何在您的网站上添加Favicon - QA @ W3C
#4楼
The format of favicon must be square otherwise the browser will stretch it. favicon的格式必须是正方形,否则浏览器将拉伸它。 Unfortunatelly, Internet Explorer < 11 do not support .gif, or .png filetypes, but only Microsoft's .ico format. 不幸的是,Internet Explorer <11不支持.gif或.png文件类型,而只支持Microsoft的.ico格式。 You can use some "favicon generator" app like: http://favicon-generator.org/ 您可以使用一些“favicon生成器”应用程序,如: http : //favicon-generator.org/
#5楼
16x16像素,* .ico格式。
#6楼
Seems like your file should be .ico
type. 好像你的文件应该是.ico
类型。
Check this post about favicons: 查看这篇关于favicons的帖子:
http://www.html-kit.com/support/favicon/image-size/ http://www.html-kit.com/support/favicon/image-size/