How to change background Opacity when bootstrap modal is open

后端 未结 14 1921
慢半拍i
慢半拍i 2020-12-24 00:37

I am using bootstrap modal. When modal is open background content opacity is not changed by default. I tried changing in js using

function showModal() {
doc         


        
相关标签:
14条回答
  • 2020-12-24 01:32

    After a day of struggling I figured out setting height :100% to .modal-backdrop.in class worked. height : 100% made opacity to show up whole page.

    0 讨论(0)
  • 2020-12-24 01:33

    You can override the modal-backdrop opacity in your stylesheet [take note of the .in class]

    .modal-backdrop.in {
        opacity: 0.9;
    }
    

    http://jsfiddle.net/ThisIsMarkSantiago/r0gwn005/1/

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