font-face 在 chrome 工作,但不在 firefox 和 ie

font-face working in chrome but not in firefox and ie

我觉得标题已经说明了我的问题所在。

这是我的代码,希望你能指出我做错了什么:

@font-face {
  font-family: 'Deer';
  src: url('fonts/Deer.eot') format('embedded-opentype');
  src: url('fonts/Deer.woff') format('woff'),
       url('fonts/Deer.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

IE 正在下载 ttf 和 woff 文件而不是 eot,而 firefox 正在下载 none 个...

试试

@font-face {
  font-family: 'Deer';
  font-weight: normal;
  font-style: normal;
  src: url('fonts/Deer.woff') format('woff'),
       url('fonts/Deer.eot') format('eot'),
       url('fonts/Deer.ttf') format('ttf');
}

我认为@font-face 中允许的参数不超过 1 个 src