我正在使用 bootstrap3,我正在使用模态来呈现表单。有什么方法可以使模态根据设备窗口大小占据移动设备的整个高度。此外,我在模态中有一个按钮。该按钮应该总是在模态的末尾。我正在尝试使用 jquery..有没有纯 CSS 的方法
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></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>
我需要这个 bootstrap modal 来占据移动页面的整个高度,modal-footer 容器应该总是在云的尽头,不管 modal-body 内容如何
最佳答案
只需编写您自己的 CSS,以便将模式的最小高度设置为 100%...因为模式背景是 100% 高度,所以 min-height: 100%
应该可以工作。
关于javascript - 根据设备大小制作一个按钮到模式结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27103059/