我已经在(app.component.html)中编写了一个登录页面的HTML代码,在(app.component.css)中编写了CSS代码,我想要导入/使用Open Sans字体。但在各种网站上,我看到了不同的答案,有些让我感到困惑。您能够提供一步一步的程序来在Angular 4中使用Open Sans字体吗?
步骤 1:插入链接到你的index.html页面中
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
步骤2:在您的CSS文件(Component.css)中使用它。* {
font-family: 'Open Sans', sans-serif;
}