栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Font Awesome 5,为什么CSS内容没有显示?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Font Awesome 5,为什么CSS内容没有显示?

如果您使用的是 JS + SVG版本,请 阅读以下内容:Font Awesome 5在使用JS +SVG版本时显示为空正方形

首先,您只需使用以下命令在head标签中包含Font Awesome 5的CSS文件:

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/all.css">

或在CSS文件中:

@import url("https://use.fontawesome.com/releases/v5.13.0/css/all.css")

然后,您需要更正 字体系列 及其 内容, 如下所示:

@import url("https://use.fontawesome.com/releases/v5.13.0/css/all.css");.fp-prev:before {    color:#000;    content: 'f35a';     font-family: "Font Awesome 5 Free";     font-style: normal;    font-weight: normal;    text-decoration: inherit;}<i ></i>

在某些情况下,您还必须添加

font-weight:900

此处有更多详细信息:伪元素上的Font Awesome5显示方形而不是图标


注意:Font Awesome 5

font-family
为每个图标包提供4种不同的颜色:

Font Awesome 5 Free
免费图标。

Font Awesome 5 Brands
适用于Facebook,Twitter等品牌图标。

@import url("https://use.fontawesome.com/releases/v5.13.0/css/all.css");.fp-prev:before {  color: #000;  content: "f099";  font-family: "Font Awesome 5 Brands";  font-style: normal;  font-weight: normal;  text-decoration: inherit;}<i ></i>

Font Awesome 5 Pro
对于字体真棒临

Font Awesome 5 Duotone
还包含在Pro软件包中。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/373173.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号