我下载了引导3.0,但无法让象形文字工作。我得到一些"E003"错误。知道为什么会这样吗?我在本地和网上都试过了,还是遇到同样的问题。


当前回答

下面是我解决这个问题的方法。我在Firebug控制台中使用“坏URI”错误。图标显示为e# ##数字。我必须在“fonts”目录中添加一个.htaccess文件。 < FilesMatch " \。(ttf |传递|测试结束| woff) $ " > < IfModule mod_headers.c > 报头设置Access-Control-Allow-Origin "*" < / IfModule > < / FilesMatch > 可能的重复:firefox上可下载的字体:错误的URI或跨站点访问不允许

其他回答

例如,确保你没有过度指定字体族

*{font-family: Verdana;}

将从I元素中删除halflings字体。

我也有类似的问题。 作为一个bootstrap的新手,原来我在图标名称之前缺少了glyphicon关键字。

<span class="glyphicon-search"></span>

应该是

<span class="glyphicon glyphicon-search"></span>

检查它是否为glyphicons-halflings-regular。Woff而不是glyphiconshalflings-regular.woff

正如@Stijn所描述的,当从Nuget安装这个包时,Bootstrap.css中的默认位置是不正确的。

将此部分更改为如下所示:

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('Content/fonts/glyphicons-halflings-regular.eot');
  src: url('Content/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded- opentype'), url('Content/fonts/glyphicons-halflings-regular.woff') format('woff'), url('Content/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('Content/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}

IIS默认情况下不会提供。woff文件,所以在IIS中你需要添加一个<mimeMap>条目到你的web。配置文件;

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension=".woff" mimeType="application/x-woff" />
        </staticContent>
    </system.webServer>
</configuration>