bootstrap remove upward arrow in dropdown

后端 未结 3 1696
礼貌的吻别
礼貌的吻别 2021-02-06 05:54

I am using Twitter bootstap and wish to remove the upward arrow on the dropdown-menu whis is in my nav. I cannot find a reference in the bootstrap.css.

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-06 06:36

    I would not recommend you to edit the bootstrap.css file. You can overwrite the styling in your custom stylesheet to hide the arrow for that component like this:

    .dropdown-menu:after {
        border: none !important;
        content: "" !important;
    }
    

    With this method you can even do the overwriting for a specific dropdown only. For example, if your dropdown was a child of an element with the id my_dropdown, you could do:

    #my_dropdown .dropdown-menu:after {
        border: none !important;
        content: "" !important;
    }
    

    This would allow you to have an arrow for other dropdowns, while hiding it for this specific dropdown.

提交回复
热议问题