【发布时间】:2023-03-03 00:48:02
【问题描述】:
我正在使用 Bootstrap 3.3.7,想知道如何为单个图像实现模态窗口。我试图仅使用内联样式来简化流程。
【问题讨论】:
我正在使用 Bootstrap 3.3.7,想知道如何为单个图像实现模态窗口。我试图仅使用内联样式来简化流程。
【问题讨论】:
感谢How to make Twitter bootstrap modal full screen,你可以这样做:
.modal-dialog {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
.modal-content {
height: auto;
min-height: 100%;
border-radius: 0;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-body">
Image here
</div>
</div>
【讨论】: