CSS Bootstrap glyphicon-menu-hamburger 未显示

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28385408/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 02:58:52  来源:igfitidea点击:

Bootstrap glyphicon-menu-hamburger not showing

csstwitter-bootstrapiconsglyphicons

提问by Incredible

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

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

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

如果我在我的 html 中使用它,这个图标不会显示,但其他图标是:

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

Why is that?

这是为什么?

回答by Herman Nz

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.

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

Other possibilities:

其他可能性:

  1. missing glyphicons font in fonts directoryc.
  2. Changes found in path of directory
  1. 字体目录中缺少字形字体c。
  2. 在目录路径中发现的更改

回答by jyrkim

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

Jean Gkol 说的有道理,因为看起来您的问题可能与您的 Bootstrap 版本有关。我在Bootply 上测试了你的代码:

<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.

它适用于 3.3.2 版。但是,一旦我将版本更改为 3.3.1、3.3.0 或 3.2.0,glyphicon 就没有出现。所以看起来汉堡包字形是 Bootstrap 组件包中的一个相当新的图像。