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


当前回答

如果你使用CDN作为引导CSS文件,它可能是罪魁祸首,因为字形文件(例如glyphicons-halflings-regular.woff)也是从CDN中获取的。

以我为例,我使用微软的CDN时遇到了这个问题,但切换到MaxCDN解决了它。

其他回答

这就是在引导3中包含图标的方式

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

http://glyphicons.bootstrapcheatsheets.com/

希望这能有所帮助。

这个答案适用于任何使用Nancy (Nancy fx)的人。

我有一个ASP。net托管的NancyFX应用程序,我通过NuGet获得了Boostrap。

我的字形不能工作,但事实证明不是糟糕的字体文件、不正确的CSS相对目录路径或其他答案中提到的任何其他事情的问题。

问题是我错过了一个惯例,告诉南希去哪里寻找内容。一旦我意识到这一点,解决方案就是简单地在我的bootstrapper文件中添加以下重载:

protected override void ConfigureConventions(NancyConventions nancyConventions)
{
    base.ConfigureConventions(nancyConventions);
    nancyConventions.StaticContentsConventions.Add(
        StaticContentConventionBuilder.AddDirectory("/fonts"));
    nancyConventions.StaticContentsConventions.Add(
        StaticContentConventionBuilder.AddDirectory("/Scripts"));
}

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

它看起来像一个UTF字符问题在你的css。只需更新您的引导css文件与新的。

您的字体目录中是否有以下所有文件

glyphicons-halflings-regular.eot
glyphicons-halflings-regular.svg
glyphicons-halflings-regular.ttf
glyphicons-halflings-regular.woff