twitter-bootstrap 如何在 Bootstrap 4 中更改导航栏边框颜色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47500730/
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
How to change navbar border color in Bootstrap 4
提问by Mr.Joe
In Bootstrap 3 we can change navbar color by setting .navbar-lightborder-color. However, it doesn't working by setting .navbar-lightborder-color in Bootstrap 4.
在 Bootstrap 3 中,我们可以通过设置.navbar-light边框颜色来更改导航栏颜色。但是,它不能通过.navbar-light在 Bootstrap 4 中设置边框颜色来工作。
回答by domshyra
Since the OP wanted just the border on the bottom.
由于 OP 只想要底部的边框。
<nav class="navbar border-bottom border-dark">
...
</nav>
if you'd like to change the colors or anything else with the borders refer to @klooven's answer.
如果您想更改颜色或其他任何带有边框的内容,请参阅@klooven 的答案。
回答by ALOMGIR HOSSEN
<style>
.navbar
{
border:5px solid #000;
}
</style>
try it
试试看
Thanks
谢谢
回答by Jayakumar Bellie
<nav class="navbar border border-dark">
...
</nav>
https://getbootstrap.com/docs/4.0/utilities/borders/#border-color
https://getbootstrap.com/docs/4.0/utilities/borders/#border-color

