我创建了字体面并将其应用于主体:

@font-face {
     font-family: 'Nosifer';
      src: url('https://fonts.googleapis.com/css?family=Nosifer');
  }
 body { font-family: 'Nosifer' }

<body>
  This is text.
</body>

但是,nosifer字体不可见。我做错什么了?
小提琴的网址:http://jsfiddle.net/9mr7973y/

最佳答案

Chrome在控制台中发出以下警告:
无法解码下载的字体:https://fonts.googleapis.com/css?family=Nosifer
OTS解析错误:版本标签无效
google字体实现指南for this font没有使用@font-face的功能。如果您想通过css导入它,他们建议您改用@import

@import url('https://fonts.googleapis.com/css?family=Nosifer');

07-26 03:45