相关疑难解决方法(0)

如何在bootstrap中更改模态的默认位置?

<div class="modal">
  <div class="modal-dialog">
    <div class="modal-content">

      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title">Modal title</h4>
      </div>

      <div class="modal-body">
        <p>One fine body…</p>
      </div>

      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>

    </div>
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

如何更改bootstrap中的默认模态位置,我应该在哪里编辑以更改默认位置.

javascript css css3 twitter-bootstrap

37
推荐指数
4
解决办法
9万
查看次数

如何垂直对齐Bootstrap v4模式对话框

Bootstrap 4中的垂直中心模态对话框.

注意:添加了以下要求以明确我正在寻找一种适当的方法来垂直居中Bootstrap模式,涵盖所有可能的设备,在所有浏览器中.在我的情况下,我想要一个大型SPA在整个应用程序中重用相同的模式,所以我需要它在每种情况下工作.

这应该:

  • 即使在高于设备高度的情况下,也可以在所有设备上访问模态内容
  • 适用于任何设备+浏览器组合,市场份额大于 1%
  • 不使用display:table-cell或类似的黑客(任何布局技术不意味着或设计用于布局)
  • 靠近clicktap在其外的任何地方.modal-content(包括上方和下方).
  • 尽可能限制jQuery/JavaScript的使用
  • (可选)处理默认的Bootstrap示例,无需进行标记修改

modal-dialog vertical-alignment flexbox bootstrap-modal bootstrap-4

21
推荐指数
4
解决办法
4万
查看次数

Bootstrap 模态的边距顶部

我在我的网站上添加了 Bootstrap 模态,但我注意到模态和屏幕顶部之间的空间大于模态和屏幕底部之间的空间。

我已经添加style="margin-top:0;padding-top:0"到每个div标签,但没有效果。

目的是减少模态和屏幕顶部之间的间隙。

html css twitter-bootstrap

2
推荐指数
1
解决办法
2万
查看次数