我下载了引导3.0,但无法让象形文字工作。我得到一些"E003"错误。知道为什么会这样吗?我在本地和网上都试过了,还是遇到同样的问题。
当前回答
正如@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');
}
其他回答
例如,如果您希望图标为glyphicon-chevron-left
尝试添加class="glyphicon glyphicon-chevron-left"
这就是在引导3中包含图标的方式
<span class="glyphicon glyphicon-bell"></span>
http://glyphicons.bootstrapcheatsheets.com/
希望这能有所帮助。
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>
如果你使用CDN作为引导CSS文件,它可能是罪魁祸首,因为字形文件(例如glyphicons-halflings-regular.woff)也是从CDN中获取的。
以我为例,我使用微软的CDN时遇到了这个问题,但切换到MaxCDN解决了它。
检查它是否为glyphicons-halflings-regular。Woff而不是glyphiconshalflings-regular.woff
推荐文章
- Bootstrap抛出Uncaught错误:Bootstrap的JavaScript需要jQuery
- Twitter Bootstrap 3 Sticky Footer
- 大Glyphicons
- 引导3导航栏崩溃
- 改变引导弹窗的宽度
- 推特引导3.0我如何“徽章徽章重要”现在
- IE8问题推特引导3
- 多模态叠加
- 我如何使象形文字更大?(改变大小?)
- 如何增加列之间的间距?
- ' aria- labels by '和' aria-hidden '是什么属性
- 用Bootstrap 3在AngularJS中表示网格或表格的最佳方法?
- 引导3 jquery事件的活动标签更改
- 引导下拉子菜单缺失
- 引导4 -字形迁移?