Twitter Bootstrap sideways caret

前端 未结 9 692
执念已碎
执念已碎 2021-01-31 03:09

I\'m using Twitter Bootstrap and some custom css (found here) to have dropdown menus open up on mouseover.

I am using the \"caret\" on a on the root menu items to show

9条回答
  •  死守一世寂寞
    2021-01-31 03:46

    I do it by adding a class that simply modifies the border styles to point the caret to the right. That way you can toggle a caret right/down by adding/removing the modifying class.

    HTML:

    
    

    CSS:

    .caret-right {
        border-left: 4px solid;
        border-bottom: 4px solid transparent;
        border-top: 4px solid transparent;
    }
    

提交回复
热议问题