作为空框呈现的字形 [英] Glyphicons rendering as empty box

查看:121
本文介绍了作为空框呈现的字形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Glyphicons使用了优秀的Twitter Bootstrap库,但是所有的图标都是空白的,如下所示:

I'm using the excellent Twitter bootstrap library with Glyphicons, however all the icons are rendering as empty squares, like so:

我已将Glyphicons字体上传到我的网页根目录,更改了 bootstrap.css 文件以指向其正确的位置,我已验证,因为他们有 200 OK 请求在Chrome的开发工具中:

I've uploaded the Glyphicons fonts to my web root and changed the bootstrap.css file to point to their correct locations, which I've verified because they have 200 OK requests in Chrome's dev tools:

这是我使用的标记:

<a href="http://www.mysite.com/download" class="btn btn-primary"><span class="glyphicon glyphicon-star"></span> Download to Computer</a>

任何想法为什么字体可能会呈现为空框? StackOverflow上的所有答案都指向不正确的字体路径,因为路径是正确的。

Any ideas why the font may be rendering as empty boxes? Previous answers on StackOverflow all point to incorrect paths to the fonts, which isn't the case here as the paths are correct.

推荐答案

不是一个解决方案,但我最终只是使用Bootstrap CDN: http://www.bootstrapcdn.com/

Not really a solution, but I ended up just using the Bootstrap CDN: http://www.bootstrapcdn.com/

这篇关于作为空框呈现的字形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆