我使用的是 Twitter Bootstrap 2.3.2,当我在 MVC4 中开发应用程序时,我对 Glyphicons 没有任何问题,直到我在 Firefox 和 IE 中对其进行了测试。
在 firefox 中,我得到以下图像而不是图标:
我检查了对 glyphicons 图像文件的引用,它们都是正确的。
在 Chrome 中调试时,我可以完美地看到图标(我清除了缓存以查看是否是这个问题,但图标仍然存在)。
最佳答案
你应该检查你的 glyphicons 相对 url 的格式是否正确:
如果你的字形图像文件在../icon/glyphicons.png
url('../icon/glyphicons.png')
但要小心,如果文件实际上在 ../img/icon/glyphicons.png 中,则 url 应该是:
url('../img/icon/glyphicons.png')
关于css - 为什么 Bootstrap Glyphicons 仅在 Google Chrome 中调试时出现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20021404/