@字体面不工作的一个客户的网站? [英] @font-face not working on a client site?

查看:97
本文介绍了@字体面不工作的一个客户的网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是CSS code

This is CSS code

@font-face {
    font-family: 'FuturaStdBook';
    src: url('site/font-face/futurastd-medium-webfont.eot');
    src: local('☺'), url('site/font-face/futurastd-medium-webfont.woff') format('woff'), url('site/font-face/futurastd-medium-webfont.ttf') format('truetype'), url('site/font-face/futurastd-medium-webfont.svg#webfont') format('svg');
    font-weight: normal;
    font-style: normal;
}

h2 {font-family:'FuturaStdBook', sans-serif}

是否可以与MIME类型?

如何确保我的路径是正确的?

How can i ensure my path is right?

推荐答案

如果您正在使用IIS,你需要注册一个MIME类型.eot扩展。

If you're using IIS, you'll need to register a MIME type for the .eot extension.


  1. 在IIS管理器,在IIS部分,打开MIME类型配置

  2. 在操作下,单击添加...

  3. 输入杂项文件在扩展盒,和应用程序/八位字节流在MIME类型框中。

  4. 单击确定

  1. In IIS Manager, in the IIS section, open the MIME Types configuration
  2. Under "Actions", click "Add..."
  3. Enter .otf in the extension box, and application/octet-stream in the MIME type box.
  4. Click OK

您需要为您使用的每个非标准扩展(的.ttf 已被注册, .woff 不是),而是应该这样做!

You'll need to do this for each non-standard extension you use (.ttf is already registered, .woff is not), but that should do it!

这篇关于@字体面不工作的一个客户的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆