【问题标题】:Importing font family in angular 4以 Angular 4 导入字体系列
【发布时间】:2018-07-19 04:46:14
【问题描述】:

我已经为(app.component.html)中的登录页面编写了html代码,它是(app.component.css)中的css,我想导入/使用Open sans,font-family。在各个网站上看到不同的答案,我有点困惑。您能否提供逐步程序以在 Angular 4 中使用 Open sans font-family?

【问题讨论】:

    标签: angular font-family


    【解决方案1】:

    两步修复

    第 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;
    } 
    

    【讨论】:

      猜你喜欢
      • 2021-06-16
      • 1970-01-01
      • 2022-07-20
      • 2021-05-08
      • 1970-01-01
      • 1970-01-01
      • 2023-03-18
      • 2018-02-22
      • 1970-01-01
      相关资源
      最近更新 更多