【发布时间】:2020-01-27 10:37:06
【问题描述】:
在 CRA 中使用网络字体时遇到问题, 在开发模式下它会像这样加载
但是在部署时,在生产模式下它似乎根本没有加载。 有什么想法吗? 这是我的css
@font-face {
font-family: 'Noto Sans';
src: local('Noto Sans KR'), url(./fonts/NotoSansKR-Black.otf) format('opentype');
font-weight: 900;
}
@font-face {
font-family: 'Noto Sans';
src: local('Noto Sans KR'), url(./fonts/NotoSansKR-Bold.otf) format('opentype');
font-weight: 700;
}
【问题讨论】: