@font-face {
font-family: 'Runescape Chat Font Regular' !important;
src:
local('Runescape Chat Font Regular'),
local('Runescape Chat Font Regular'),
url('Runescape Chat Font Regular.ttf');
}
.
.message-group.compact .message .message-text .markup .user-name {
font-family: 'Runescape Chat Font Regular', sans-serif !important;
font-size: 13px !important;
font-weight: 100 !important;
}
我正在尝试使用安装在我的计算机上的字体,但它不起作用。我的代码有错误吗?未显示 Runscape Chat Font Regular 字体。 (这是给一群会预装字体的 friend ,所以必须要安装字体才能正常工作)
最佳答案
你好,这就是你在 css 中引用字体的方式
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
请参阅 learn more
关于html - 使用本地存储在计算机上的字体,不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40128864/