Change color of bootstrap navbar on hover link?

后端 未结 13 1872
感情败类
感情败类 2020-12-07 16:42

I want to know how to change the color of the links when you hover over them in the nav bar, as currently they are an ugly color.

Thanks for any suggestions?

13条回答
  •  广开言路
    2020-12-07 17:02

    You would have to overwrite the CSS rule:

    .navbar-inverse .brand, .navbar-inverse .nav > li > a
    

    or

    .navbar .brand, .navbar .nav > li > a 
    

    depending if you are using the dark or light theme, respectively. To do this, add a CSS with your overwritten rules and make sure it comes in your HTML after the Bootstrap CSS. For example:

    .navbar .brand, .navbar .nav > li > a {
        color: #D64848;
    }
    .navbar .brand, .navbar .nav > li > a:hover {
        color: #F56E6E;
    }
    

    There is also the alternative where you customize your own Boostrap here. In this case, in the Navbar section, you have the @navbarLinkColor.

提交回复
热议问题