【发布时间】:2017-05-24 02:04:10
【问题描述】:
如何在 css 中使用 font-awesome?我搜索了一下,发现我只需要下载 font-awesome 目录并将其复制到我的项目中,然后使用 css 中的内容显示图标。
【问题讨论】:
-
Font Awesome CDN 是在您的项目中获得 Font Awesome 的最简单方法 [fontawesome.io/get-started]
如何在 css 中使用 font-awesome?我搜索了一下,发现我只需要下载 font-awesome 目录并将其复制到我的项目中,然后使用 css 中的内容显示图标。
【问题讨论】:
来自文档:
Using CSS
Copy the entire font-awesome directory into your project.
In the <head> of your html, reference the location to your font-awesome.min.css.
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
然后在页面的代码中插入这样的图标:
<i class="fa fa-camera-retro fa-2x"></i>
【讨论】:
http://fontawesome.io/get-started/
使用 CSS
Copy the entire font-awesome directory into your project.
In the <head> of your html, reference the location to your font-awesome.min.css.
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
【讨论】: