Html 如何通过css使用字体

Html 如何通过css使用字体,html,css,fonts,Html,Css,Fonts,如何在css中使用字体?我搜索了一下,发现我只需要下载FontAwesome目录并将其复制到我的项目中,然后使用css中的内容显示图标 使用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. 从文件中: Using CSS Copy the enti

如何在css中使用字体?我搜索了一下,发现我只需要下载FontAwesome目录并将其复制到我的项目中,然后使用css中的内容显示图标

使用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.

从文件中:

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>

有关更多示例,请参阅。在这里您可以找到所有的名字。

Font Awesome CDN是在项目中获得Font Awesome的最简单方法[]
<i class="fa fa-camera-retro fa-2x"></i>