Bootstrap modal hide is not working

后端 未结 20 1318
温柔的废话
温柔的废话 2020-12-09 08:11

Bootstrap modal hide is not working. Alert comes in else. but my modal is not hidden Added bootply. My issue is the same one.

20条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 08:45

    I had the same issue. I tried the JavaScript way suggested in the post, unfortunately it only worked half of the time. If I triggered my modal a few times, it bugs out. As a result I created a work around using CSS:

    /* Hide the back drop*/
    .modal-backdrop.show {
        display: none;
    }
    /* Simulate the backdrop using background color */
    .modal-open .modal {
        background-color: rgba(47, 117, 19, 0.3);
    }
    

提交回复
热议问题