【问题标题】:Import and use google webfont导入和使用 google webfont
【发布时间】:2013-10-10 07:24:23
【问题描述】:

对于一个项目,我必须使用多种字体样式。 这是the google font的链接

这是我的 css 导入

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

我想知道的是如何定义要显示的字体系列,例如“Open Sans Light 300 Italic”

谢谢

【问题讨论】:

    标签: css fonts google-font-api


    【解决方案1】:

    300/400/700 是字体粗细。如果你想要粗体字体使用

    font:bold(or 700) 12px/15px "Open Sans", sans-serif
    

    如果你想要浅斜体使用

    font:300 italic 12px/15px "Open Sans", sans-serif
    

    【讨论】:

      【解决方案2】:

      CSS

      @import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700);
              body {
                  font-family: 'Open Sans', sans-serif;
              }
      
              body p {
                  font-style: italic;
                  font-weight: 300; /* You specify the number you see next to the fonts to change from light to bold ie you would put 700 etc. etc. */
              }
      

      【讨论】:

      • 我不明白这部分:“...family=Open+Sans:300italic,400italic”。什么以及如何应用第二个(400 斜体)字体粗细?
      【解决方案3】:

      我想这就是你要找的。​​p>

      body {
        font-family: "Open Sans";
        font-weight: 300;
        font-style: italic;
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-11-11
        • 2012-03-08
        • 2017-05-15
        • 2013-03-14
        • 2012-11-23
        • 1970-01-01
        • 2015-04-05
        • 1970-01-01
        相关资源
        最近更新 更多