【发布时间】:2021-06-24 13:25:25
【问题描述】:
@page "/"
<style>
@import url('https://fonts.googleapis.com/css2?family=Work+Sans');
body {
margin: 0;
font-family: 'Work Sans';
color: #4d4d4d;
}
</style>
在 React.js 中,我可以简单地使用 @import 来使用标签来使用 Google 字体,但在 Blazor 中我得到了错误 The name 'import' does not exist in current context。为 Blazor 应用全局使用 Google 字体的正确方法是什么。
【问题讨论】: