Bootstrap 3 字形未正确显示 [英] Bootstrap 3 glyphicon is not displayed correctly
问题描述
<a class="btn btn-default" id="exportdata" href="#"><i class="glyphicon-export"></i></a>
在 Chrome 34 上,字形显示一个正方形"
On Chrome 34 the glyphicon shows a "square"
在 IE 11 上,字形不显示任何内容
On IE 11 the glyphicon shows nothing
在 FF 28 上,glyphicon 显示一个带有数字/字符的奇怪图标,看起来已损坏...
On FF 28 the glyphicon shows an odd icon with numbers/chars it looks broken...
我的超链接有什么问题?
What is wrong with my hyperlink?
我知道 SO 上存在类似/相同的问题.但他们没有帮助我.
I know there are similar/same problems on SO. But they did not help me.
例如这个:Twitter Bootstrap 3 Glyphicons 错误
这个 security.yml 文件在哪里?它不在我的字体文件夹中!
Where is this security.yml file? Its not in my fonts folder!
我在我的 chrome 控制台中得到了这个:
I get this in my chrome console:
Resource interpreted as Font but transferred with MIME type font/x-woff: "http://localhost:5264/fonts/fontawesome-webfont.woff?v=4.0.3".
为什么解释为字体?我必须在 IIS 中设置一些东西吗?
Why interpreted as Font? Do I have to set something in IIS?
推荐答案
哦,亲爱的...答案是当我这样做时字体有效:
oh dear... the answer is that the font works when I do this:
<i class="glyphicon glyphicon-export"></i>
而不是这个:
<i class="glyphicon-export"></i>
缺少一个 .glyphicon 类...
one .glyphicon class was missing...
这篇关于Bootstrap 3 字形未正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!