bootstrap css - how to make a modal dialog modal w

2020-05-19 04:32发布

In bootstrap css, it is possible to display a modal dialog, but I want to be able to make it modal so the UI behind doesn't respond, without having the dark black background shown.

There seems to be no options that allow me to do this on the $("#selector").modal() function.

7条回答
三岁会撩人
2楼-- · 2020-05-19 05:06

add data-backdrop="false" to <div class="modal"> and Bootstrap will do the rest.

Example:

<div class="modal" id="genericModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="false">
查看更多
登录 后发表回答