- 官网下载Font Awesome旧版或最新版;http://www.fontawesome.com.cn/faicons/
- 将CSS内的font-awesome文件放到自己的css文件夹中;
- 将Fonts文件夹取出,同放到与CSS文件夹同级目录即可
![在这里插入图片描述 [css] 如何使用Font Awesome_.net](https://file.cfanz.cn/uploads/png/2022/12/21/14/HI2e4709M3.png)
<link rel="stylesheet" href="../css/font-awesome.css">
- css代码
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}- 然后,就可以在网页中插入你想要的图标了。
找到图标的名称
![在这里插入图片描述 [css] 如何使用Font Awesome_CSS_02](https://file.cfanz.cn/uploads/png/2022/12/21/14/3RB4e358V8.png)
6. 在fontawesome文件夹里找到font-awesome.css并打开
![在这里插入图片描述 [css] 如何使用Font Awesome_.net_03](https://file.cfanz.cn/uploads/png/2022/12/21/14/fM8R6TadOf.png)
![在这里插入图片描述 [css] 如何使用Font Awesome_.net_04](https://file.cfanz.cn/uploads/png/2022/12/21/14/1e1e3GIAE6.png)
可以看到,刚才要找的图标的编码为f2b9,此时就可以在html文件中直接使用这个字符了
@font-face {
font-family: 'FontAwesome';
src: url('../font/fontawesome-webfont.eot?v=4.7.0');
src: url('../font/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}i::after {
content: "\f00d";
width: 9px;
height: 9px;
color: rgba(0, 0, 0, .45);
font-family: FontAwesome;
}![在这里插入图片描述 [css] 如何使用Font Awesome_CSS_05](https://file.cfanz.cn/uploads/png/2022/12/21/14/QSGWG636B6.png)










