在 Firefox 中使用来自 bootstrap 3.3.5 的字形图标有一些问题

Having some problems with glyphicons from bootstrap 3.3.5 in Firefox

我找不到问题的答案。 Glyphicons 在 Firefox 中仍然不起作用。仅限 Firefox。

例如我所做的:<li class="active"><a href="#"><span class="glyphicon glyphicon-search"></span> Home</a></li>

在我的 .css 文件中:

@font-face {
  font-family: 'Glyphicons Halflings';

src: url('../fonts/glyphicons-halflings-regular.eot'); src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); }

根据您针对该问题发布的 jsfiddle,您似乎缺少所需的 CDN。在我包括这些之后:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script

displayed 字形。确保您的页面中包含这些并且它应该可以工作。 :)