bootstrap css - 如何在不影响背景的情况下制作模态对话框模态 [英] bootstrap css - how to make a modal dialog modal without affecting the background

查看:41
本文介绍了bootstrap css - 如何在不影响背景的情况下制作模态对话框模态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 bootstrap css 中,可以显示模态对话框,但我希望能够将其设为模态,这样后面的 UI 就不会响应,而不会显示深黑色背景.

似乎没有选项允许我在 $("#selector").modal() 函数上执行此操作.

解决方案

摆脱背景:

模态启动后

$('#XXX').modal({show:true});

直接触发下面的代码

 $('.modal-backdrop').removeClass("modal-backdrop");

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.

解决方案

To get rid of the backdrop:

After modal initiation

$('#XXX').modal({show:true});

just trigger the code below

 $('.modal-backdrop').removeClass("modal-backdrop");    

这篇关于bootstrap css - 如何在不影响背景的情况下制作模态对话框模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆