相关疑难解决方法(0)

一些bootstrap glyphicons没有加载

我有一个WordPress主题,我正在使用Bootstrap Sass源构建.样式是有效的,但大多数字形不是(只有星号和加号).我正在编译我的Bootstrap到style.css相对于那个,有一个文件夹调用fonts它来保存glyphicons(我设置$icon-font-path: "fonts/";)这是我编译的一个片段style.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"); }
.glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: normal; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
Run Code Online (Sandbox Code Playgroud)

例如,这些工作:

<span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span>
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Run Code Online (Sandbox Code Playgroud)

但这些不是:

<span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
<span class="glyphicon glyphicon-heart" aria-hidden="true"></span>
Run Code Online (Sandbox Code Playgroud)

这是一个glyphicon类的片段:

.glyphicon-asterisk:before { content: "\2a"; }
.glyphicon-plus:before { content: "\2b"; …
Run Code Online (Sandbox Code Playgroud)

wordpress sass twitter-bootstrap bootstrap-sass glyphicons

6
推荐指数
1
解决办法
2万
查看次数