javascript - 允许用户在 Bootstrap 模式之外进行交互

标签 javascript html css twitter-bootstrap

有没有一种快速简便的方法允许用户在 bootstrap modal 时与我的网页(模式之外)进行交互?显示?我正在使用第 3 版的 Bootstrap 。这也不会导致模式关闭,这是我通过将 backdrop 设置为 false 来实现的。

最佳答案

使用评论中引用的答案,我创建了这个 css 类并将其添加到模态 div。

.modal-allow-interact {
   position: absolute;
   top:50px;
   left: 0;
   right: 0;
   bottom: auto;
   width: 800px;  /* this can be however wide you want the modal to be */
   margin: 0 auto;
}

.modal-allow-interact .modal-dialog {
   margin: 0;
}

关于javascript - 允许用户在 Bootstrap 模式之外进行交互,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39356414/

相关文章:

javascript - 我可以保存一个文件,该文件将仅使用 javascript/C/C++ 在服务器端从 php 代码生成,并且没有打开浏览器吗?

html - 防止元素在 bootstrap 4 导航栏切换中折叠

javascript - 自动化 - CSS 和 JS 最小化和合并文件

javascript - 如何使用 JQuery 将动态图像添加到表格中的特定单元格?

javascript - jQuery 弹出窗口不起作用 - 简单的自定义弹出窗口

html - 在 IE7 中的表格中显示背景的一个像素

css - Wordpress 不显示 CSS

javascript - 无法 GET/定义路由

Javascript - Spine MVC - 类

javascript - 当单选按钮客户端检查更改时使用 JQuery 调用函数