css - Twitter bootstrap 和 css : How to remove the modal overlay and refocus on the input box, 以便用户可以在模式打开时输入

标签 css twitter-bootstrap twitter-bootstrap-3

我有一个模态窗口,当用户关注搜索输入框时,它会打开。但目前当模态打开时,模态背景覆盖会阻止它。 我怎样才能将模态覆盖背景移动得更低,这样用户仍然可以在模态窗口保持打开状态时在搜索输入框中键入内容。

<form>

    <input type="email" class="form-control border-left-none" id="openmodalOnfocus" placeholder="enter text">
</form>

<div class="modal hide" id="myModal">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">×</button>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
      <div class="row">
          <div class=" col-md-4">
            lorem i[p sum on left
         </div>

          <div class=" col-md-4">
            lorem ipsom on right
         </div>
      </div>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn" data-dismiss="modal">Close</a>
    <a href="#" class="btn btn-primary">Save changes</a>
  </div>
</div>

最佳答案

只需将此添加到您的 CSS 中:

.modal-backdrop {
    z-index: -1;
    opacity: 0 !important;
    width: 0px;
    height: 0px;
}

关于css - Twitter bootstrap 和 css : How to remove the modal overlay and refocus on the input box, 以便用户可以在模式打开时输入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23740586/

相关文章:

css - 即使 @grid-gutter-width 为 0,Bootstrap 3 列也不接触

javascript - 在每个元素的基础上修改 X 可编辑模板(不是全局)

php - 在@import 之后覆盖 Bootstrap LESS 变量

javascript - Bootstrap 表中的可编辑单元格格式

html - 尝试将多个 div 标签居中并将它们保持在同一行

javascript - jQuery html onclick 存储 anchor ID,然后从 javascript 数组中提取内容

ruby-on-rails - 缺少 Rails 模板

javascript - 在 IE8+ 中使用 Twitter Bootstrap 选项卡启用后退按钮处理

javascript - 检查图像是否存在与多个背景图像

html - 带有 CSS 的倾斜图像框