Bootstrap 3:并非所有glyphicons内容代码都在加载

时间:2016-08-29 09:46:41

标签: css twitter-bootstrap glyphicons

我面临一个奇怪的问题,我希望有人可以帮助我。 我试图通过列表中的内容代码加载glyphicons。

现在,我面临的问题如下: 所有不以'e'开头的glyphicon代码都像魅力一样:

.contact-box__info--email::before {
    content:"\2709";
}

但是以'e'开头的字形不起作用:

.contact-box__info--phone::before {
    content: "\e035"; 
}

glyphicons在我的引导程序中很好地加载。当我通过这样的跨度调用glyphicons时:

<span class="glyphicon glyphicon-phone"></span>

他们运作良好..

基本上只有这些字形有效:

.glyphicon-asterisk:before {
  content: "\2a";
}

.glyphicon-plus:before {
  content: "\2b";
}

.glyphicon-euro:before {
  content: "\20ac";
}

.glyphicon-minus:before {
  content: "\2212";
}

.glyphicon-cloud:before {
  content: "\2601";
}

.glyphicon-envelope:before {
  content: "\2709";
}

.glyphicon-pencil:before {
  content: "\270f";
}

之前其他人是否遇到过此问题?

1 个答案:

答案 0 :(得分:0)

在我们最近的一个项目中,我们也遇到了类似的问题,经过一些研究后发现我们的一位前端开发人员已经更改了bootstrap.css文件中@ font-face和glyphicon类的默认bootstrap font-family 。 将它们恢复为引导​​默认值(font-family: 'Glyphicons Halflings';) 解决了这个问题。