我不确定是否正确但在导航栏中使用bootstrap nav-pills不起作用,因为nav在bootstrap.css中具有优先权.如果正确,那么我们不想在导航栏中使用这些导航样式吗?
4094行 .nav-pills > .active > a, .nav-pills > .active > a:hover, .nav-pills > .active > a:focus { color: #ffffff; background-color: #0088cc; }
第4623行
.navbar .nav > .active > a,
.navbar .nav > .active > a:hover,
.navbar .nav > .active > a:focus {
color: #555555;
text-decoration: none;
background-color: #e5e5e5;
-webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
-moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
}
Run Code Online (Sandbox Code Playgroud)