twitter-bootstrap Twitter Bootstrap favicon.ico

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29711282/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 22:33:26  来源:igfitidea点击:

Twitter Bootstrap favicon.ico

htmlcsstwitter-bootstraptwitter-bootstrap-3

提问by timbram

I am working on a site using the one of the twitter bootstrap templates and my JavaScript console is complaining that it is missing:

我正在使用 twitter bootstrap 模板之一的网站上工作,我的 JavaScript 控制台抱怨它丢失了:

 favicon.ico

 ie-emulation-modes-warning.js

I downloaded all of the Bootstrap files from the Bootstrap website. What are these files and do I need them?

我从 Bootstrap 网站下载了所有的 Bootstrap 文件。这些文件是什么,我需要它们吗?

If so, where can I get them?

如果是这样,我在哪里可以得到它们?

Edit: Thanks guys! Looked into Favicons and didn't realize that is what they are! So simple! lol

编辑:谢谢各位!查看 Favicon 并没有意识到它们是什么!很简单!哈哈

回答by nikk wong

By default, browsers look for favicons in your site's root directory. You can use favicon generators online, which (by standard) create 16x16 pixel png-like objects that are used as your site's icon on a browser tab, etc. Just make one of those and drop it in your root directory.

默认情况下,浏览器会在您站点的根目录中查找网站图标。您可以在线使用网站图标生成器,它(按标准)创建 16x16 像素的 png 类对象,用作浏览器选项卡上站点的图标等。只需制作其中一个并将其放入根目录即可。

If that doesn't work, you may want to use your inspector (assuming you're using chrome), right click > inspect element > console (or network), and look there to see where your template is looking for the favicon. Just drop the generated .ico file in that folder.

如果这不起作用,您可能需要使用检查器(假设您使用的是 chrome),右键单击 > 检查元素 > 控制台(或网络),然后查看您的模板在哪里寻找图标。只需将生成的 .ico 文件放在该文件夹中即可。

For the JS file, you may be able to find it online, download it, use the inspector again, and drop it wherever your browser is looking for it. This is good for performance—missing files slow roundtrip requests down.

对于 JS 文件,您可以在网上找到它,下载它,再次使用检查器,然后将它放在浏览器要查找的任何地方。这对性能有好处——丢失的文件会降低往返请求的速度。

回答by garryp

It's something browsers look for by default. Nothing to do with Bootstrap

这是浏览器默认寻找的东西。与 Bootstrap 无关

http://en.wikipedia.org/wiki/Favicon

http://en.wikipedia.org/wiki/Favicon