Bootstrap glyphicon-menu-hamburger没有显示

时间:2015-02-07 17:50:19

标签: css twitter-bootstrap icons glyphicons

这里有明确定义的汉堡包菜单引导图标:http://getbootstrap.com/components/#glyphicons-glyphs

如果我在我的html中使用它,则此图标不显示,但其他图标为:

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

为什么?

2 个答案:

答案 0 :(得分:10)

它是引导程序版本中的glyphicon版本问题,因为它将始终更新,因此请使用相同的版本。你可以在这里查看http://getbootstrap.com/getting-started/。看起来它在v3.3.2中兼容并检查你的。

其他可能性:

  1. 字体directoryc中缺少glyphicons字体。
  2. 目录路径
  3. 中发现的更改

答案 1 :(得分:5)

Jean Gkol有一个观点,因为看起来您的问题可能是您的Bootstrap版本。我在Bootply您的代码进行了测试:

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

并且它适用于版本3.3.2。但是,一旦我将版本更改为3.3.1,3.3.0或3.2.0,glyphicon就不会显示出来。因此看起来汉堡包glyphicon在Bootstrap组件包中是一个非常新的图像。