字体系列正在运行。但字体粗细不正常。例如,我添加了字体粗细:400或100等到h3-h4等它不工作。只有一个字体粗细工作正常,它的字体粗细:600我完全完成了,我研究了两天,我问我的朋友,但我的问题仍然在这里。我认为我的@字体脸的设置是正确的。但我不知道..请任何人可以帮助我?
@font-face {
font-family: "Gotham Narrow";
src: local("../font/gothamnarrow-thin-webfont.woff2") format("woff2"),
local("../font/gothamnarrow-thin-webfont.woff") format("woff");
font-weight: 100;
font-style: normal;
}
@font-face {
font-family: "Gotham Narrow";
src: local("../font/gothamnarrow-light-webfont.woff2") format("woff2"),
local("../font/gothamnarrow-light-webfont.woff") format("woff");
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: "Gotham Narrow";
src: local("../font/gothamnarrow-book-webfont.woff2") format("woff2"),
local("../font/gothamnarrow-book-webfont.woff") format("woff");
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: "Gotham Narrow";
src: local("../font/gothamnarrow-medium-webfont.woff2") format("woff2"),
local("../font/gothamnarrow-medium-webfont.woff") format("woff");
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: "Gotham Narrow";
src: local("../font/gothamnarrow-bold-webfont.woff2") format("woff2"),
local("../font/gothamnarrow-bold-webfont.woff") format("woff");
font-weight: 700;
font-style: normal;
}
@font-face {
font-family: "Gotham Narrow";
src: local("../font/gothamnarrow-ultra-webfont.woff2") format("woff2"),
local("../font/gothamnarrow-ultra-webfont.woff") format("woff");
font-weight: 800;
font-style: normal;
}
@font-face {
font-family: "Gotham Narrow";
src: local("../font/gothamnarrow-black-webfont.woff2") format("woff2"),
local("../font/gothamnarrow-black-webfont.woff") format("woff");
font-weight: 900;
font-style: normal;
}
3条答案
按热度按时间c9x0cxw01#
你能试试src:url(“...”)而不是本地:而woff并不是真的需要,因为所有支持woff的浏览器也都支持woff2...
5gfr0r5j2#
好的,如果谷歌字体也不起作用,请试试?
kkbh8khc3#
首先我的字体文件有问题,一些字符显示不正确。所以我下载字体另一个网站,现在好了。其次,必须是url()而不是local()