引导字形缺失 [英] Bootstrap glyphicons are missing

查看:79
本文介绍了引导字形缺失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道为什么,但是我的Bootstrap(3.3.7)的glyphicons丢失了,它们被一个正常且丑陋的正方形所替代.这是一个调用缺少的字形的代码示例:

I don't know why, but my glyphicons from Bootstrap (3.3.7) are missing, they are being substituted by a normal and ugly square. Here is an example of code that calls a missing glyphicon:

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

这是包含glyphicon字体的Bootstrap部分:

And here it is the Bootstrap part that contains glyphicon's font:

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

推荐答案

您需要更新它,使用cdn链接,将其添加到您的代码中

you need to update it , use cdn link, add this to your code

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

这篇关于引导字形缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆