Favicon 在 IE 中显示,但在 Firefox 和 Chrome 中不显示
我最近在我的 htdocs 目录中添加了一个 16px x 16 px favicon.ico 文件。
结果如下:
IE - 正确显示在地址栏、选项卡栏和书签栏中
Chrome - 正确显示在书签栏
Firefox - 正确显示在书签栏
我希望我的网站图标显示在地址栏和选项卡栏中Chrome 和 Firefox 的版本,我需要做什么才能实现这一点?
谢谢?
I recently added a 16px by 16 px favicon.ico file to my htdocs directory.
The results are as follows:
IE - correctly displays in address bar, tab bar, and bookmarks bar
Chrome - correctly displays in bookmarks bar
Firefox - correctly displays in bookmarks bar
I'd like to have my favicon display in the address bar and tab bar of Chrome and Firefox, what do I need to do to accomplish this?
Thanks?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如建议的通过这篇文章,简单地将 favicon.ico 文件添加到您网站的根目录是不鼓励的向您的网站添加收藏夹图标的方法。鼓励的方法是在 << 中添加以下行:头>...< /头> html 部分:
这篇文章建议 rel="shortcut 图标" 方法正在被 rel="icon" 方法取代,但为了安全起见,出于兼容性原因,我喜欢同时包含这两种方法,并将 favicon.ico 文件放入网站的根目录;这样我的所有基础都涵盖了所有浏览器。
As suggested by this post, simply adding the favicon.ico file to your site's root directory is the discouraged method of adding a favorite icon to your site. The encouraged method is to add the following lines within the < head>...< /head> section of your html:
This post suggests that the rel="shortcut icon" method is being replaced by the rel="icon" method, but to be safe for compatibility reasons I like to include both, as well as put the favicon.ico file in the site's root directory; this way all my bases are covered for all browsers.
将位置添加到xhtml中
add the location into the xhtml