Bootstrap navbar-toggler-icon不可见,但功能正常 [英] Bootstrap navbar-toggler-icon not visible but functioning normally
问题描述
我正在尝试将我的引导导航栏实施到我的把手布局文件中.我注意到引导程序发生了一些奇怪的事情,这也不例外.一旦我将窗口缩小到应显示的navbar-toggler-icon大小,它是不可见的,但它仍在按其应有的方式运行,我只是看不到它.
I am trying to get my bootstrap navbar implemented into my handlebars layout file. I've noticed some weird things happening with bootstrap and this is no exception. Once I shrink my window to a size where the navbar-toggler-icon should show, it is not visible, but it is still functioning there like it should, I just can't see it.
这是我的整个layout.hbs类:
Here is my entire layout.hbs class:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body>
<nav id="navigation" class="navbar navbar-inverse">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
</div>
</nav>
{{{body}}}
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
</body>
</html>
以下是发生的情况的一个示例:
发生的事情的图片
有人告诉我将我的导航栏类更改为navbar-inverse
会使它出现,但是我也没有运气.
Here is an example of whats happening:
Picture of whats happening
I was told changing my navbar class to navbar-inverse
would make it appear but I had no luck with this either.
推荐答案
尝试使用navbar navbar-light
而不是navbar navbar-inverse
.
Bootstrap 4是对较旧的Bootstrap的主要重写,并且已更改
Bootstrap 4 is a major rewrite of the older Bootstrap and this was changed
这篇关于Bootstrap navbar-toggler-icon不可见,但功能正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!