Einige bootstrap glyphicons nicht laden
Habe ich ein WordPress-theme, dass ich Gebäude mit Bootstrap Sass Quelle. Die styles sind in Arbeit, aber die meisten die glyphicons nicht (nur Sternchen und plus). Ich kompiliere meine Bootstrap in die style.css
und relativ zu diesem ist ein Ordner namens fonts
hält, die die glyphicons (ich habe die $icon-font-path: "fonts/";
) Hier ist ein Ausschnitt aus meinem kompiliert style.css
zu zeigen, dass die Schriften Pfad korrekt ist:
@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; }
E.g, diese Arbeit:
<span class="glyphicon glyphicon-asterisk" aria-hidden="true"></span>
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
Aber diese nicht:
<span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>
<span class="glyphicon glyphicon-heart" aria-hidden="true"></span>
Hier ist ein Ausschnitt des glyphicon-Klassen:
.glyphicon-asterisk:before { content: "\2a"; }
.glyphicon-plus:before { content: "\2b"; }
.glyphicon-star:before { content: \e006; }
.glyphicon-thumbs-up:before { content: \e125; }
Ich habe in der Netzwerk-Registerkarte, um zu sehen, ob es am laden war die glyphicon-Schriften, und Sie werden nur angezeigt, wenn die glyphicons Arbeit (Stern, plus). Andernfalls wird die schriftart-Datei gar nicht angezeigt in der Registerkarte "Netzwerk" (nicht einmal ein 404
).
InformationsquelleAutor Jonny | 2015-02-01
Du musst angemeldet sein, um einen Kommentar abzugeben.
Das Problem war, dass die Inhalte, die Werte waren nicht eingewickelt in Anführungszeichen. Dies ist immer noch ein Problem mit der http://www.getbootstrap.com sass source-download, aber war vor kurzem behoben in der bootstrap-sass github repo.
InformationsquelleAutor Jonny