在 angular 4 中导入字体系列

Importing font family in angular 4

我已经在 (app.component.html) 中为登录页面编写了 html 代码,在 (app.component.css) 中它是 css,我想 import/use打开sans,字体系列。在各种 websites.Can 中看到不同的答案让我有点困惑 你提供了在 angular 4?

中使用 Open sans font-family 的逐步程序

2 步修复

Step - 1 : Insert the link in your index.html page

<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

Step - 2 : Use it In your css file (Component.css)

* {
  font-family: 'Open Sans', sans-serif;
}