谷歌的Open Sans字体重量

时间:2017-07-15 03:23:09

标签: html css google-font-api

我在html页面中使用Google Open Sans字体:

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

只有font-weight: 600;才能使字体变为粗体。其他价值似乎没有什么区别。如何使用CSS规则获得此特定字体的中间字体权重?或者我必须使用其他字体吗?

1 个答案:

答案 0 :(得分:7)

您使用的内容仅包含400字体粗细字体文件。为了获得其他字体粗细字体文件,您还需要选择字体粗细,例如

@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700');

请注意,您使用的字体权重越多,加载这些文件所需的时间就越多。要添加更多字体粗细,请按照以下步骤操作。

  1. 转到Open Sans字体页,然后点击选择此字体选项 enter image description here
  2. 最大化页脚上的框,然后单击自定义
  3. enter image description here

    1. 现在,在此处选择您要为此字体选择的字体粗细。您已完成,请返回嵌入并获取新网址。
    2. enter image description here

相关问题