Hide bootstrap's .dropdown-backdrop, CSS only

后端 未结 1 1291
温柔的废话
温柔的废话 2021-01-14 08:18

Is it possible to hide Bootstrap\'s .dropdown-backdrop element for a certain dropdown (not all on the page) by using CSS only?

I\'ve determined that this is possible

相关标签:
1条回答
  • 2021-01-14 08:53

    Found solution: .dropdown-backdrop is a descendant of its .dropdown, which can have a unique ID, so simply using display:none; in CSS works fine, as in:

    #firstDropdown .dropdown-backdrop {
        display:none;
    }
    

    And then all other dropdowns (except #firstDropdown) will still have a backdrop as normal.

    See JSFiddle updated.

    0 讨论(0)
提交回复
热议问题