这是我的CSS:
@font-face {
font-family: 'geometria_lightlight';
src: url('Geometria-Light-webfont.eot');
src: url('Geometria-Light-webfont.eot?#iefix') format('embedded-opentype'),
url('Geometria-Light-webfont.woff2') format('woff2'),
url('Geometria-Light-webfont.woff') format('woff'),
url('Geometria-Light-webfont.ttf') format('truetype'),
url('Geometria-Light-webfont.svg#geometria_lightlight') format('svg');
font-weight: lighter;
font-style: normal;
}
#logo{
font-family: 'geometria_lightlight';
font-size: 60px;
}
这是我在 Chrome 中收到的消息:
无法解码下载的字体:http://localhost:3000/Geometria-Light-webfont.woff2 http://localhost:3000/Geometria-Light-webfont.woff2localhost/:1 OTS 解析错误:版本标记无效
localhost/:1 无法解码下载的字体:http://localhost:3000/Geometria-Light-webfont.woff http://localhost:3000/Geometria-Light-webfont.woff
我通过 Font Squirrel 下载的每一种字体都会收到此消息。
将你的字体粘贴到文件夹中public/fonts
.
然后做这样的事情:
@font-face {
font-family: 'BebasNeueRegular';
src: url('/fonts/BebasNeue-Regular.ttf') format('truetype');
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)