【发布时间】:2017-08-17 11:55:25
【问题描述】:
我想在网页上使用一种自定义字体。特别是 GT-Walsheim-Pro-Medium-Oblique.woff 来自:
https://andrewsonline.co.uk/content/fonts/
我正在使用的 style.css 是这样的:
https://github.com/syunghong/veil/blob/master/css/style.css
如何使用 @fontface 将此字体文件合并到我的 style.css 文件中?
我在名为 fonts 的文件夹中有 GT-Walsheim-Pro-Medium-Oblique.woff。
【问题讨论】:
-
对,我只是不确定将@fontface 放在我已经拥有的位置中的什么位置……它会去哪里 - 到底是什么?
-
通常在 CSS 文件的顶部。
-
索引前?这是否意味着我需要从以下位置删除任何内容:
html, body { height: 100%; width: 100%; margin: 0; color:#111111; font-family: Roboto, "Helvetica Neue", Arial, sans-serif; font-size:21px; font-weight:300; letter-spacing:0.1px; word-spacing:0.5px; }