javascript - 阴影 Bootstrap 框对话框

标签 javascript twitter-bootstrap modal-dialog bootstrap-modal bootbox

我正在使用bootbox创建 Bootstrap 模式。以下是我创建示例的方法:

bootbox.dialog({message: "hello"});

我的问题是渲染的对话框有点被禁用(所有屏幕都被遮蔽),我无法单击它,甚至 ESC 也无法使模式消失!

当我检查浏览器中的对话框元素时,我看到的是:

<div class="bootbox modal fade in" tabindex="-1" role="dialog" style="display: block;" aria-hidden="false">
  <div class="modal-backdrop fade in" style="height: 321px;"></div>
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
        <button type="button" class="bootbox-close-button close" data-dismiss="modal" aria-hidden="true" style="margin-top: -10px;">×</button>
        <div class="bootbox-body">hello</div>
      </div>
    </div>
  </div>
</div>

我检查了 bootbox 示例,看起来它与已使用的 CSS 类相同。那么这里出了什么问题呢?

最佳答案

我必须添加以下 CSS 来解决该问题:

.modal-backdrop.fade.in {
  z-index: 0;
}

关于javascript - 阴影 Bootstrap 框对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29542215/

相关文章:

jquery - 如何使用 Twitter Bootstrap 切换模式窗口?

javascript点击事件不触发 Action

html - 动态调整单元格宽度后抑制按钮组中的按钮换行

javascript - 更改页面加载后动态添加的元素的 onclick 处理程序

jquery - Bootstrap 将默认导航栏转换为固定导航栏

twitter-bootstrap - React Bootstrap - 如何手动关闭 OverlayTrigger

javascript - 如何在模态 Bootstrap 上获取值复选框

jquery - Bootstrap 模式在点击任意位置时关闭

javascript - 为什么我的 Javascript 对话框无法工作

javascript - 使 Bootstrap 进度条从 0 到 100% 动画