我下载了引导3.0,但无法让象形文字工作。我得到一些"E003"错误。知道为什么会这样吗?我在本地和网上都试过了,还是遇到同样的问题。
当前回答
下载完整/非定制包从那里的网站和替换您的字体文件与非定制包字体。意志是固定的。
其他回答
如果您正在使用CDN,请确保您使用的是最新版本的CDN链接。我正在使用CDN链接的前一个版本,并试图添加更新的图标,我在网站上找到(其中包含最新版本的图标),因此它没有显示在网页上。将cdn链接更改为最新版本可能会有所帮助。
我也有同样的问题,除了在本页的隐藏评论中,我找不到任何关于它的信息。根据Chrome浏览器,我的字体文件加载正常,但图标显示不正常。我把这个作为答案,希望能帮助到其他人。
我从Bootstrap 3的定制工具下载的字体文件有问题。要获得正确的字体,请访问Bootstrap主页并下载完整的.zip文件。从那里提取四个字体文件到你的字体目录,一切都应该工作。
这就是为什么图标没有出现在我面前的原因:
* {
arial, sans-serif !important;
}
在我已经删除了我的CSS的这一部分,一切都像它应该工作。重要的是引起麻烦的那个。
我必须创建一些重写条件来允许它们:
RewriteCond %{REQUEST_URI} !(^.+\.ttf)
RewriteCond %{REQUEST_URI} !(^.+\.eot)
RewriteCond %{REQUEST_URI} !(^.+\.svg)
RewriteCond %{REQUEST_URI} !(^.+\.woff)
对我来说有效的是替换以下路线:
@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');
}
to
@font-face {
font-family: 'Glyphicons Halflings';
src: url('/assets/glyphicons-halflings-regular.eot');
src: url('/assets/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
url('/assets/fonts/glyphicons-halflings-regular.woff') format('woff'),
url('/assets/glyphicons-halflings-regular.ttf') format('truetype'),
url('/assets/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}