【发布时间】:2020-05-21 02:06:18
【问题描述】:
我不知道为什么,但是我的 Bootstrap (3.3.7) 中的字形图标不见了,它们被一个普通且丑陋的正方形所取代。以下是调用缺失字形图标的代码示例:
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-star" aria-hidden="true"></span> Star
</button>
这里是包含 glyphicon 字体的 Bootstrap 部分:
@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');
}
【问题讨论】:
-
您能否展示您的代码中链接到字形图标或引导文件的部分?
-
@BlueBoy 谢谢伙计,但已经解决了我的问题!但是,我从引导程序中留下了 glyphicon 字体的一部分
标签: css twitter-bootstrap menu responsive glyphicons