bootstrap 3 arrow on dropdown menu

前端 未结 4 1867
渐次进展
渐次进展 2020-12-12 12:14

In bootstrap 2 the dropdown menu had an upwards arrow as it can be seen here (i am not talking about the carret). Now using bootstrap 3 or latest git this arrow doesn\'t exi

4条回答
  •  青春惊慌失措
    2020-12-12 12:36

    Just to follow up on this - if you want the arrow to position itself correctly (like when using it on a navbar element that is right-aligned, you need the following additional CSS to ensure the arrow is right-aligned:

    .navbar .navbar-right > li > .dropdown-menu:before,
    .navbar .nav > li > .dropdown-menu.navbar-right:before {
        right: 12px; left: auto;
    }
    
    .navbar .navbar-right > li > .dropdown-menu:after,
    .navbar .nav > li > .dropdown-menu.navbar-right:after {
        right: 13px; left: auto;
    }
    

    Note the "navbar-right" - that was introduced in BS3 instead of pull-right for navbars.

提交回复
热议问题