2017-03-27 1 views
1

Je ne sais pas pourquoi, mais mes glyphicons de Bootstrap (3.3.7) sont manquants, ils sont remplacés par un carré normal et laid. Voici un exemple de code qui appelle un glyphicon manquant:Les glyphicons bootstrap manquent

 <button type="button" class="btn btn-default"> 
      <span class="glyphicon glyphicon-star" aria-hidden="true"></span> Star 
     </button> 

Et voilà la partie Bootstrap qui contient la police de glyphicon:

@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'); 
} 
+0

Pouvez-vous afficher la partie de votre code liée aux fichiers glyphicons ou bootstrap? –

+0

@BlueBoy Merci l'homme, mais déjà résolu mon problème! Cependant, j'ai laissé la partie de la police de glyphicon de bootstrap –

Répondre

3

vous devez le mettre à jour, lien utilisation cdn, ajoutez à votre code

<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> 
+0

Cela a fonctionné pour moi! Merci beaucoup! –

+0

Je suis un débutant ici et pas en mesure d'upvote, mais je l'ai déjà marqué comme juste! –

+0

Vlw, sou brasileiro também, boa sorte! –

0

vous devez télécharger Bootstrap dans ce lien http://getbootstrap.com.br/getting-started/#download, après le téléchargement, vous devez mettre les polices dans votre projet. Dans la nouvelle version ne pas avoir de polices dans le paquet Bootstrap, mais vous pouvez télécharger dans l'ancienne version.