-2
我在我的項目中使用了一個引導程序3,我有這個導航欄navbar-inverse。導航欄的背景顏色是黑色的,因爲它是相反的。我想要做的是更改該導航欄的背景顏色。我試過這段代碼,但它不工作。線性漸變css不能在導航欄中使用導航欄
.navbar-inverse {
margin-bottom: 0px;
-webkit-box-shadow: 0 8px 30px -6px black;
-moz-box-shadow: 0 8px 30px -6px black;
box-shadow: 0 8px 30px -6px black;
background: -moz-linear-gradient(center top, #2ebf16, #217812);
background: -webkit-gradient(linear, left top, left bottom, from(#2ebf16), to(#217812));
background: -o-linear-gradient(top, #2ebf16, #217812);
filter: progid: DXImageTransform.Microsoft.gradient(startColorStr='#2ebf16', EndColorStr='#217812');
}
.navbar-inverse .container {
width: 100%;
padding: 0;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div class="container-fluid">
<div class="navbar navbar-inverse navbar-static-top">
<div class="container">
<div class="navbar-header">
<a href="#" class="navbar-brand">Land Tenure Services</a>
<button class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
哦,它只是工作!昨天,當我嘗試它沒有什麼變化,但現在當我嘗試它只是工作..我不知道發生了什麼。 – kier