如何更改 Bootstrap 导航栏的背景颜色
How to Change Background Color of Bootstrap Navbar
我正在尝试更改 Bootstrap 中编码的导航栏的颜色。到目前为止,已经内置 Bootstrap 类 应用于导航栏以更改背景颜色和其中的锚链接,但它们根本没有更改颜色。有什么办法可以解决这个问题吗?
这里是 HTML:
<!-- import Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<nav class="navbar navbar-light bg-white navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- <a class="navbar-brand" href="#">WebSiteName</a> -->
<a href="index.html"><img src="fusebloomLogo.png" alt="FuseBloom logo" class="logo"/></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="#home">Home</a></li>
<li><a href="#mission">Mission</a></li>
<li><a href="#reviews">Reviews</a></li>
<li><a href="#process">Process</a></li>
</ul>
</div>
</div>
</nav>
.navbar-light {
background-color: yellow !important;
}
你检查过了吗color-boostrap v5
<nav class="navbar navbar-light" style="background-color: #ffffff;">
<!-- Navbar content -->
</nav>
.navbar-light {
background-color: yellow !important;
border: none !important;
border-width:0!important;
}
我正在尝试更改 Bootstrap 中编码的导航栏的颜色。到目前为止,已经内置 Bootstrap 类 应用于导航栏以更改背景颜色和其中的锚链接,但它们根本没有更改颜色。有什么办法可以解决这个问题吗?
这里是 HTML:
<!-- import Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<nav class="navbar navbar-light bg-white navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- <a class="navbar-brand" href="#">WebSiteName</a> -->
<a href="index.html"><img src="fusebloomLogo.png" alt="FuseBloom logo" class="logo"/></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="#home">Home</a></li>
<li><a href="#mission">Mission</a></li>
<li><a href="#reviews">Reviews</a></li>
<li><a href="#process">Process</a></li>
</ul>
</div>
</div>
</nav>
.navbar-light {
background-color: yellow !important;
}
你检查过了吗color-boostrap v5
<nav class="navbar navbar-light" style="background-color: #ffffff;">
<!-- Navbar content -->
</nav>
.navbar-light {
background-color: yellow !important;
border: none !important;
border-width:0!important;
}