css - Firefox 和 IE 中的 DIN webfont 不工作

标签 css firefox fonts webfonts

我在 Firefox 和 MSIE 中实现 DIN 字体时遇到问题。它在 Chrome 中运行良好。

导入代码如下:

@font-face {    
font-family: DINweb;
src: url('/wp-content/themes/quickstep-child/DINWeb.eot');
src: url('/wp-content/themes/quickstep-child/DINWeb.eot?#iefix') format('embedded-opentype'),
url('/wp-content/themes/quickstep-child/DINWeb.woff') format('woff'),
url('/wp-content/themes/quickstep-child/DINWeb.ttf') format('truetype'); 
font-weight: normal; 
font-style: normal;
}

字体在 CSS 中是这样调用的:

font-family:  DINWeb, sans-serif!important;

网址是www.andvordgrafisk.no

最佳答案

这个语法对我有用:

@font-face {
    font-family: 'DIN_Medium'; 
    src: url('../fonts/DIN_Medium.eot'); /* IE9 Compatibility Modes */
    src: url('../fonts/DIN_Medium.eot?') format('eot'),  /* IE6-IE8 */
    url('../fonts/DIN_Medium.otf') format('otf'), 
    url('../fonts/DIN_Medium.ttf') format('truetype'); /* Safari, Android, iOS */
    }

如果您没有扩展名,您可以在这里生成它们 http://www.freefontconverter.com/

关于css - Firefox 和 IE 中的 DIN webfont 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16731507/

相关文章:

html - 背景颜色只填充 h2 元素而不是整个 div 容器

css - 如何更改组合框下拉按钮的对齐方式?

javascript - onfocus 在 Firefox 中不起作用(触发)

css - float 在标题中,导航列表和浏览器边缘之间没有间隙

php - 如何在跑马灯中显示 mysql 数据?

javascript - Firebug:在断点期间,无法执行控制台语句

html - 脚本中的双连字符使 firefox 呈现奇怪

c++ - 在编辑控件中使用上标和下标

fonts - javafx 实际默认字体

swift - 在 swift 中使用自定义字体