字体和CSS伪元素-一些unicode字符不';行不通
我使用FA和:before来使用图标而不是项目符号 有些unicode字符可以工作,有些则不行。例如,f004(心脏)、f005(星形)和f2dc(雪花)工作。但是f001(音乐)、f008(电影)和f046(检查)不起作用 我正在免费使用fa5.0.6字体和CSS伪元素-一些unicode字符不';行不通,unicode,font-awesome-5,Unicode,Font Awesome 5,我使用FA和:before来使用图标而不是项目符号 有些unicode字符可以工作,有些则不行。例如,f004(心脏)、f005(星形)和f2dc(雪花)工作。但是f001(音乐)、f008(电影)和f046(检查)不起作用 我正在免费使用fa5.0.6 @font-face { font-family: 'awe506'; src: url("../fontawesome506/fa-regular-400.eot"); src: url("../fontawesome506/f
@font-face {
font-family: 'awe506';
src: url("../fontawesome506/fa-regular-400.eot");
src: url("../fontawesome506/fa-regular-400.eot?#iefix") format("embedded-opentype"),
url("../fontawesome506/fa-regular-400.woff2") format("woff2"),
url("../fontawesome506/fa-regular-400.woff") format("woff"),
url("../fontawesome506/fa-regular-400.ttf") format("truetype"),
url("../fontawesome506/fa-regular-400.svg#fontawesome") format("svg");
}
.bulletsamples ul {
list-style-type: none;
padding-left: 0;
margin-left: 2em;
}
.bulletsamples li {
position: relative;
padding-left: 2em;
margin-bottom: 10px;
}
.bulletsamples li:before {
position: absolute;
top: 0;
left: 0;
font-family: awe506;
font-weight: 400;
font-style: normal;
font-variant: normal;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
}
.stars li:before {
content: "\f005"; /*THIS WORKS*/
color: blue;
}
.stars li:before {
content: "\f008"; /*THIS DOESN'T WORK*/
color: blue;
}
不,我没有两颗星。李:在我的CSS规则之前,我添加了这个来说明
在足总网站()上,我过滤了列表,只显示自由设置中包含的图标
另外-图标是空心的-我按照足总网站上的说明,将实心图标的字体重量设置为900,没有任何区别
提前感谢-Cath看起来不像
u+f008
在该字体/版本中有字形;它根本不存在
根据需要,您需要使用固态版
而不是普通版
版(仅限“Pro”)。这也适用于u+f001
u+f046
显然已在某个点移动到u+f14a
@字体{
字体系列:awe506;
src:url(fa-solid-900.woff);
}
.明星{
字体系列:awe506;
}
李:以前{
/*内容:'';*/
内容:'\f005';
颜色:蓝色;
}
李:以后呢{
/*内容:'';*/
内容:'\f008';
颜色:蓝色;
}
- 福
- 酒吧
感谢您的建议,Jan,但f008给出了相同的结果。@CathGillespie您必须使用“solid”版本,如提供的示例代码所示。谢谢!我没有注意到字体文件名的更改-我很抱歉