Bootstrap modal z-index

后端 未结 9 1236
时光说笑
时光说笑 2020-12-29 20:22

The issue is: I\'m using parrallx scrolling, so I have z-index in the page now when I try to popup a box-modal by Bootstrap I get him to look like this https://www.dropbox.c

相关标签:
9条回答
  • 2020-12-29 21:17

    Try this Script:

    function addclassName(){
    setTimeout(function(){
                var c = document.querySelectorAll(".modal-backdrop");
                for (var i = 0; i < c.length; i++) {
                    c[i].style.zIndex =  1040 + i * 20  ;
                }
                var d = document.querySelectorAll(".modal.fade");
                for(var i = 0; i<d.length; i++){
                    d[i].style.zIndex = 1050 + i * 20;
                }
    }, 10);
    

    }

    0 讨论(0)
  • 2020-12-29 21:19

    ok, so if you are using bootstrap-rtl.css, what you can do is go to the following class .modal-backdrop and remove the z-index attribute. after that all should be fine

    0 讨论(0)
  • 2020-12-29 21:20

    I found this question as I had a similar problem. While data-backdrop does "solve" the issue; I found another problem in my markup.

    I had the button which launched this modal and the modal dialog itself was in the footer. The problem is that the footer was defined as navbar_fixed_bottom, and that contained position:fixed.

    After I moved the dialog outside of the fixed section, everything worked as expected.

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