CSS 字体在 Mozilla Firefox、Microsoft Edge 和 Opera 上不工作

CSS font face is not working on Mozilla Firefox, Microsoft Edge and Opera

我正在为网站使用 "DinRoundWeb" 和 "DINRoundComp" 字体系列。 CSS 样式表中的声明如下所示:

 @font-face {
 font-family: Din;
 src: url("fonts/DINRoundWeb.eot"), url("fonts/DINRoundWeb.woff")              format("woff"), url("fonts/DINRoundComp.ttf") format("truetype");
 font-weight: 400;
 }
 @font-face {
 font-family: Din;
 src: url("fonts/DINRoundWeb-Medium.eot"), url("fonts/DINRoundWeb-  Medium.woff") format("woff"), url("fonts/DINRoundComp-Medium.ttf")    format("truetype");
 font-weight: 600;

}

并且字体文件在 fonts 文件夹中。正文样式如下:

   body{
   font-family: Din ,sans;
   color: #444;
   line-height: 1.5rem;
   font-size: 1rem;
   background-color: #f3f3f3;
   }

该样式没有应用到页面中,而且不仅出现在Web Developer Tools-> Fonts-> All Fonts下。

如有任何指示,我将不胜感激! 我的风格

从 css 文件的角度尝试相对路径。每个权重需要一个额外的 font-family,如下所示:

@font-face {
  font-family: 'DNRM';
  src: url('../fonts/DINRoundWeb-Medium.eot');
  src: url('../fonts/DINRoundWeb-Medium.eot?#iefix') format('embedded-opentype'), url('../fonts/DINRoundWeb-Medium.woff') format('woff');
}

@font-face {
  font-family: 'DNRR';
  src: url('../fonts/DINRoundWeb.eot');
  src: url('../fonts/DINRoundWeb.eot?#iefix') format('embedded-opentype'), url('../fonts/DINRoundWeb.woff') format('woff');
}