简体   繁体   English

引导多个模态,最后一个模态全部消失

[英]Bootstrap multiple modal dismiss all with the last modal

How can i create multiple overlapping modal popups, and dismiss all the modals with the close button (data-dismiss) on the last modal. 我如何创建多个重叠的模态弹出窗口,并使用上一个模态上的关闭按钮(数据禁用)关闭所有模态。

Thanks in advance. 提前致谢。

您应该能够创建多个模态,这些模态将自然地根据它们的单击顺序彼此重叠。然后,在您希望能够关闭所有模态的任何模态上,都可以使用它,并根据自己的喜好进行调整:

$('.modal').modal('hide');

Stacking modals isn't supported out-of-the-box in Bootstrap, you'll need to fiddle with the JS (& possibly CSS) yourself: Bootstrap不支持现成的堆栈模式,您需要自己弄弄JS(可能还有CSS):

Overlapping modals not supported 不支持重叠模态

Be sure not to open a modal while another is still visible. 确保在另一个仍然可见的情况下不要打开模式。 Showing more than one modal at a time requires custom code. 一次显示多个模态需要自定义代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM