子目录中的Favicon全部是子域名 [英] Favicon in subdirectory all subdomain

查看:143
本文介绍了子目录中的Favicon全部是子域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯将favicon.ico保存在 public_html 文件夹中以添加图标。



我现在遇到的问题是,我想要显示某个子目录的所有文件( example.com/example onwards),只是放在那里,不会似乎做的工作。



我知道我可以通过文件去文件,并添加:

 < link rel =快捷图标href =/ favicon.icotype =image / x-icon/> 

但我希望有一种更实用的方法,首先我认为可能有一种方式通过CSS,但这似乎并非如此。



这会派上用场,因为每个文件都已经包含:

 < link rel =stylesheettype =text / csshref =test.css/> 

那么,如何解决这个问题的任何想法或解决方法?

链接rel = ... 表示法指定favicon。



浏览器将仅在域的根目录中搜索默认 /favicon.ico 。您必须明确指定的任何变化。


I am used to just save the favicon.ico in the public_html folder for adding the favicon.

The problema I have now is that I want to display the in all the files of a certain subdirectory, ( example.com/example "onwards" ) just putting it there, doesnt seem to do the job.

I know I could go document by document and add:

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

But I hope there is a more practical way, first I thought there might be a way trough CSS but that doesnt seem to be the case.

This would have come in handy because every document already includes:

<link rel="stylesheet" type="text/css" href="test.css" />

So any ideas or workarounds to how to solve this?

解决方案

You will have to specify the favicon using the link rel=... notation.

Browsers will search only in the root directory of the domain for a default /favicon.ico. Any variations from that you have to specify explicitly.

这篇关于子目录中的Favicon全部是子域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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