【问题标题】:How to use different fonts which are not in google api?如何使用不在 google api 中的不同字体?
【发布时间】:2020-08-08 16:48:01
【问题描述】:

我可以使用 google api 中提供的所有字体。 但是如何使用google api中没有的colorpop和aileron等字体。 在 html 和 css 中设计时如何使用这些字体。

【问题讨论】:

标签: html css google-api


【解决方案1】:

与您使用谷歌字体一样。您需要在本地下载字体的唯一区别。

【讨论】:

    【解决方案2】:

    首先你应该下载requre字体,然后你可以将该字体导入到你的css代码中

    【讨论】:

      【解决方案3】:

      你可以下载到本地,放到你的项目中,然后

      @font-face {
        font-family: colorpop;
        src: url(colorpop.woff);
      }
      

      确保你的源路径正确,就是这样,简单吧?

      然后在你的 css 中使用该字体系列

      .myclass {
        font-family: colorpop;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-06-24
        • 2016-09-14
        • 2021-03-09
        • 2018-10-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多