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


当前回答

之前的答案都不适合我....

问题是我正在尝试<span class="icones glyphicon glyphicon-pen"> 一个小时后,我意识到这个图标不包括在Bootstrap包!而信封图标工作正常..

其他回答

如果其他解决方案不起作用,您可能希望尝试从外部源导入Glyphicons,而不是依赖Bootstrap为您完成所有工作。这样做:

你可以在HTML中这样做:

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">

或CSS:

@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css")

来自这个线程的信用edsiofi: Bootstrap 3 Glyphicons CDN

这是由于bootstrap.css和bootstrap.min.css中的错误编码。当你从定制器下载Bootstrap 3.0时,以下代码是缺失的:

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

因为这是使用Glyphicons的主要代码,所以它不会在ofc…

从完整的包中下载css文件,这段代码将被实现。

我必须创建一些重写条件来允许它们:

RewriteCond %{REQUEST_URI} !(^.+\.ttf)
RewriteCond %{REQUEST_URI} !(^.+\.eot)
RewriteCond %{REQUEST_URI} !(^.+\.svg)
RewriteCond %{REQUEST_URI} !(^.+\.woff)

我也有同样的问题,除了在本页的隐藏评论中,我找不到任何关于它的信息。根据Chrome浏览器,我的字体文件加载正常,但图标显示不正常。我把这个作为答案,希望能帮助到其他人。

我从Bootstrap 3的定制工具下载的字体文件有问题。要获得正确的字体,请访问Bootstrap主页并下载完整的.zip文件。从那里提取四个字体文件到你的字体目录,一切都应该工作。

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