我下载了引导3.0,但无法让象形文字工作。我得到一些"E003"错误。知道为什么会这样吗?我在本地和网上都试过了,还是遇到同样的问题。
当前回答
我也遇到了同样的问题,CSS很好,没有任何问题。 它还包含了所有的字体。
但是这个问题在我安装了“glyphicons- hallings -regular.ttf”后才得到解决,我开始在UI上正确地获得图标。
其他回答
我正在看我的这个老问题,因为到目前为止应该是正确答案的答案是我在评论中给出的,我认为我也应该为此得到赞扬。
问题在于,从bootstrap的自定义工具下载的字形字体文件与从bootstrap主页上的重定向下载的字体文件不相同。正常工作的是那些可以从以下链接下载的软件:
http://getbootstrap.com/getting-started/#download
任何对旧的糟糕的定制文件有问题的人都应该从上面的链接覆盖字体。
检查它是否为glyphicons-halflings-regular。Woff而不是glyphiconshalflings-regular.woff
这就是在引导3中包含图标的方式
<span class="glyphicon glyphicon-bell"></span>
http://glyphicons.bootstrapcheatsheets.com/
希望这能有所帮助。
如果其他解决方案不起作用,您可能希望尝试从外部源导入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
正如@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');
}
推荐文章
- 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 -字形迁移?