最佳答案
使用@font-face 过去我在使用 font-face 时遇到过很多麻烦,但如果你输入正确,它就可以正常工作:
@font-face {
font-family: 'Custom Font Name';
font-style: normal;
font-weight: 400;
src: url(linktofont.com/font.ttf) format('truetype');
}
将“自定义字体名称”替换为您希望在使用 CSS 时为字体命名的名称。并将“linktofont.com/font.ttf”替换为字体路径。
编辑
对不起,我读错了,我找到了问题所在。如果你看看你的@import
@import url (http://pastebin.com/raw.php?i=sc4rCApa);
你在“url”和你的路径之间有一个空格,所以用:
@import url(http://pastebin.com/raw.php?i=sc4rCApa);
关于html - 无法显示自定义网页字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19758703/