为什么 CSS 中的 Gotham 字体不能在 firefox 上运行?

why Gotham font in CSS is not working on firefox?

我在css中使用的是@font-face,如下所示

   @font-face {
    font-family: 'Gotham';

    src: url('../assets/fonts/Gotham Book.otf')format("opentype");
}

body {
background:transparent;
min-height:100%;    
-webkit-font-smoothing: antialiased;
-webkit-overflow-scrolling: touch;
line-height: 1.5em;
font-size:14px;
font-family: Gotham;
color:#fff;
color:rgba(255,255,255,.8); 
font-weight: normal;

} 它在 chrome 中完美运行,但在显示为 times new roman 的 fire fox 中失败。 font gotham 已安装在文件夹中,link 与给定的一样。

我认为这个问题的解决方案是应用 .eot.woff.woff2,就像您所做的那样

请参考下面的例子。

@font-face {
   font-family: 'co-text';
   src: url('CoText-Light.eot');
   src: url('CoText-Light.eot?#iefix') format('embedded-opentype'),
       url('CoText-Light.woff2') format('woff2'),
       url('CoText-Light.woff') format('woff'),
       url('CoText-Light.ttf') format('truetype');
   font-weight: 300;
   font-style: normal;
}

如果有任何问题,请告诉我。