使用favicon与css [英] using favicon with css

查看:545
本文介绍了使用favicon与css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为相当大量的网页设置网站图标。但是,与其使用HTML < head> 标记< link rel =shortcut iconhref =favicon.ico> / code>,我想在CSS文件中设置它。我有限制访问一些html文件,并限制其生命周期的控制。

I want to set the favicon for a fairly large number of pages. But, instead of using the HTML <head> tag <link rel="shortcut icon" href="favicon.ico">, I'd like to set it in the CSS file. I have limited access to some of the html files, and limited control to their life cycle.

推荐答案

然而,大多数浏览器会寻找一个 favicon.ico 文件 - 因此,如果您访问 http://example.com 大多数浏览器会自动查找 http://example.com/favicon.ico

Most browsers will, however, look for a favicon.ico file on the root of the web site - so if you access http://example.com most browsers will look for http://example.com/favicon.ico automatically.

这篇关于使用favicon与css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆