Favicon不会在Webkit浏览器上显示 [英] Favicon does not show on Webkit browsers
本文介绍了Favicon不会在Webkit浏览器上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这段代码
< link rel =快捷图标type =image / icohref =img / favicon.ico>
由于某些原因,Firefox显示的图标很好,但在Webkit浏览器中显示不出来。我在Mac上尝试了Google Chrome和Safari,但没有显示出来;我需要为这些浏览器做些什么吗?
解决方案
尝试放置相对路径并将类型更改为image / x-图标:
< link rel =快捷图标type =image / x-iconhref =/ img /favicon.ico/>
或者将它放在根目录下:
< link rel =快捷图标type =image / x-iconhref =favicon.ico/>
I'm having problems with putting a favicon on my website.
I have this code
<link rel="shortcut icon" type="image/ico" href="img/favicon.ico">
And for some reason Firefox shows the favicon fine, but on Webkit browsers its not showing up. I tried Google Chrome and Safari on a Mac and its not showing up; do I need to do something for these browsers?
解决方案
Try placing a relative path and change the type to "image/x-icon":
<link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico" />
Or just place it on the root:
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
这篇关于Favicon不会在Webkit浏览器上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文