Bootstrap glyphicon-menu-hamburger not showing

2019-06-20 06:28发布

问题:

Here is clearly defined bootstrap icon for hamburger menu: http://getbootstrap.com/components/#glyphicons-glyphs

If I use it in my html this icon is not showing, but others icon are:

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

Why is that?

回答1:

It's a matter of glyphicon version in your bootstrap version for it will be always updated so use the same version. you can check it here http://getbootstrap.com/getting-started/. it looks it is compatible in v3.3.2 and check yours.

Other possibilities:

  1. missing glyphicons font in fonts directoryc.
  2. Changes found in path of directory


回答2:

Jean Gkol has a point, because it looks like that your issue is probably down to your Bootstrap version. I tested at Bootply your code:

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

and it worked with version 3.3.2. However, once I changed the version to 3.3.1, 3.3.0 or 3.2.0 the glyphicon didn't show up. So it looks like that the hamburger glyphicon is a quite new image in the Bootstrap Component pack.