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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 01:09:24  来源:igfitidea点击:

How to change navbar border color in Bootstrap 4

csstwitter-bootstrapbootstrap-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 的答案。

Here is the link too.

这里也是链接

回答by ALOMGIR HOSSEN

 <style>
        .navbar
        {
            border:5px solid #000;
        }
      </style>

try it

试试看

Thanks

谢谢

回答by Klooven

You can use the border classes in Bootstrap.

您可以在 Bootstrap 中使用边框类。

Check thispage for the classes.

检查页面以了解课程。

Eg. class border-primary.

例如。类border-primary