gpt4 book ai didi

html - 我可以在 font-face 之前使用 font-family 吗?

转载 作者:行者123 更新时间:2023-11-28 05:44:19 27 4
gpt4 key购买 nike

我很好奇 css 规则 font-family 和 font-face 的正确顺序...

我可以在 font-face 之前使用 font-family 吗?

像这样:

h2 {
font-family: 'inconsolatacyrmedium';
}


@font-face {
font-family: 'inconsolatacyrmedium';
src: url('inconsolatacyr-webfont.woff2') format('woff2'),
url('inconsolatacyr-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;

}

最佳答案

我认为你应该在 font-family 之前使用@font-face,因为浏览器从头到尾读取 css。

关于html - 我可以在 font-face 之前使用 font-family 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37695536/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com