我在尝试通过 CSS 中的类使用我的 .ttf 字体时遇到了一些麻烦。问题是什么都没有显示。我已经加载了 .ttf 字体文件并从 .ttf 字体文件为这个特定的图标创建了一个 CSS 类。我拥有的所有可用信息都是关于这个特定图标的:
字形:5 字符# : 97 统一码:0061 一个
@font-face {
font-family: 'remoglyph';
src:url('../RemoGlyphs.ttf');
font-weight: normal;
font-style: normal;
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
font-family: 'remoglyph';
font-style: normal;
speak: none;
font-weight: normal;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
.icon-arrowdown:before {
content: "\e0061";
}
<i class="icon-arrowdown"></i>
在上面你可以看到我的 CSS 和 HTML 源代码。
提前感谢您的任何建议。
最佳答案
愚蠢的错误,对不起大家..
content: "\0061"
还是谢谢你:)
关于HTML/CSS 通过 unicode + CSS 中的类使用 ttf 字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35393041/