Bootstrap glyphicon-menu-hamburger没有显示

Inc*_*ble 6 css icons twitter-bootstrap 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>
Run Code Online (Sandbox Code Playgroud)

这是为什么?

Her*_* Nz 10

这是你的bootstrap版本中的glyphicon版本的问题,因为它将一直更新,所以使用相同的版本.你可以在这里查看http://getbootstrap.com/getting-started/.看起来它在v3.3.2中兼容并检查你的.

其他可能性:

  1. 字体directoryc中缺少glyphicons字体.
  2. 在目录路径中找到的更改

  • 是的,我使用的是3.2.0而不是3.3.2.但是,我使用了字体真棒图标而不是bootstrap,它看起来比bootstrap的模糊图标要好得多. (2认同)

jyr*_*kim 5

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

<button class="btn btn-default" type="button">
    <span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span>
</button>
Run Code Online (Sandbox Code Playgroud)

它适用于3.3.2版本.但是,一旦我将版本更改为3.3.1,3.3.0或3.2.0,则不会显示glyphicon.所以看起来汉堡包glyphicon是Bootstrap组件包中的一个非常新的图像.