css - https @font-face 不适用于 IE 7 和 IE8

标签 css fonts

我们有一个网站,下面有一个 CSS。笑脸在那里,因此它可以与 IE 7 和 IE 8 一起使用。但是,站点字体在 IE 9、chrome、firefox 等上工作正常,但在 IE 7 和 8 上不工作。

@font-face {
        font-family: 'BrauerNeue-Bold';
        src: url('fonts/brauerneue-bold-webfont.eot');
        src: local('☺'), 
              url('fonts/brauerneue-bold-webfont.woff') format('woff'), 
              url('fonts/brauerneue-bold-webfont.ttf') format('truetype'),
              url('fonts/brauerneue-bold-webfont.svg#webfontvlyLbaAW') format('svg');
        font-weight: normal;
        font-style: normal;
    }

我还验证了以下内容:

  1. eot、woff 和 ttf 字体位于 Fonts 文件夹下。

  2. 直接通过 URL 访问时可以下载这些文件。

  3. 字体第一次在 IE7 和 8 上加载正常,但当我们执行 CTRL + F5 或浏览器刷新时,上述字体不会呈现。

  4. 已验证 eot 存在于 IIS 7.0 mime 类型上。

  5. HTTP 还是 HTTPS 重要吗

  6. 需要任何 IIS 配置吗?

有人可以帮助我如何让上述字体在 IE7 和 8 上工作

谢谢

最佳答案

像这样使用它 -

@font-face {
    font-family: 'MyFontFamily';
    src: url('myfont-webfont.eot?#iefix') format('embedded-opentype'), 
         url('myfont-webfont.woff') format('woff'), 
         url('myfont-webfont.ttf')  format('truetype'),
         url('myfont-webfont.svg#svgFontName') format('svg');
    }

Read more here

关于css - https @font-face 不适用于 IE 7 和 IE8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12564322/

相关文章:

html - 用 flexbox 居中多个面板

linux - 串行控制台和帧缓冲区控制台上的字体

java - JButton 内的上划线文本

rust - 如何在 Rust 中使用自由类型绑定(bind)?

javascript - 构建多页响应式表单的最佳方式是什么?

html - 从过渡继承的字体

html - 当 div 显示设置为内联时,<figure> 元素未水平排列

css - 在 Pre 标签中包装一个 DIv

python - 如何在pygame中使用其他字体?

fonts - CSS3 : Is there a way to alter Font Height?