bootstrap: change modal backdrop opacity only for specific modals

后端 未结 6 1870
暗喜
暗喜 2021-02-05 06:28

I have a menu with multiple modals. When I open one over another it turns backgrount into black, which is ugly. I understand that I need change filter: alpha(opacity=80);<

6条回答
  •  时光说笑
    2021-02-05 06:57

    Took me forever, but I found a one-liner.

    $(window).load(function(){
        // remove greying background bootstrap modal effect
        $(".modal-backdrop ").attr('class', 'someClass');
    
    });
    

    Removing the class removed the modal. But renaming it keeps the functionality but gets rid of the background greying.

提交回复
热议问题