【发布时间】:2023-03-09 22:55:02
【问题描述】:
我正在尝试在 CSS 的内容中使用 FontAwesome。
它与图标的代码一起出现,而不是图标。我已按照在线帮助进行操作,但仍然无法正常工作
css
@font-face {
font-family: 'FontAwesome';
src: url('https://use.fontawesome.com/releases/v5.0.6/css/all.css');
}
.fp-prev:before {
color:#fff;
content: '/f35a';
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-decoration: inherit;
}
【问题讨论】:
-
@font-face src 应该指向字体文件..
-
如果你在离线使用 font awesome 5 也包括 webfonts 文件夹
标签: css font-awesome pseudo-element font-awesome-5