twitter-bootstrap 我可以在没有 bootstrap css 的情况下使用 fontawesome 图标吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18559937/
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 18:11:55  来源:igfitidea点击:

Can I use fontawesome icons without the bootstrap css?

htmlcsstwitter-bootstrapfonts

提问by Hans

I have downloaded the fontawesome icons into a folder and the CSS into another folder. I would like to try them out now but I am currently getting:

我已将 fontawesome 图标下载到一个文件夹中,并将 CSS 下载到另一个文件夹中。我现在想尝试一下,但我目前得到:

"Error 503 Backend is unhealthy, Backend is unhealthy,Guru Meditation: XID: 1379938886 Varnish cache server"

when I go to the Example page on the fontawesome web site.

当我转到 fontawesome 网站上的示例页面时。

http://fortawesome.github.io/Font-Awesome/examples/

http://fortawesome.github.io/Font-Awesome/examples/

Can someone give me a very very simple example of how I can use an SVG font icon inside a DIV. Just the simplest would be good as I can then work out how to modify it.

有人可以给我一个非常简单的例子,说明如何在 DIV 中使用 SVG 字体图标。最简单的会很好,因为我可以弄清楚如何修改它。

Also I just want the very minimum so can I use the SVG without adding bootstrap.css files?

另外我只想要最小的所以我可以在不添加 bootstrap.css 文件的情况下使用 SVG 吗?

回答by Hans

At http://fontawesome.io/get-started/there's a "Not using Bootstrap?" section how to use it without Bootstrap.

http://fontawesome.io/get-started/ 上有一个“不使用 Bootstrap?” 部分如何在没有 Bootstrap 的情况下使用它。

And here: http://fontawesome.io/examples/are examples how to use it. e.g. in a div:

在这里:http: //fontawesome.io/examples/是如何使用它的示例。例如在一个 div 中:

<div><i class="icon-camera-retro"></i></div>