How to change color of opened Bootstrap dropdown toggle?

后端 未结 5 922
南方客
南方客 2020-12-28 09:05

When Dropdown is opened - I want to change default color of it. I want to change border color and background using css.

5条回答
  •  暖寄归人
    2020-12-28 09:32

    Here is your problem:

    #original.menu .nav-pills .dropdown .open .dropdown-toggle {
        border: 1px solid blue;
    }
    
    #suggested.menu .nav-pills .dropdown .dropdown-toggle {
        border: 1px solid red;
    }
    

    http://jsfiddle.net/userdude/mjbN7/

    .open doesn't exist in the element chain.

    And here is your fiddle with the border (which had both the .open and no border-style or border-width to style):

    http://jsfiddle.net/userdude/bdCMU/4/

提交回复
热议问题