大佬教程收集整理的这篇文章主要介绍了如何使用 css 在中心对齐 Modal 表单?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
这是我的模态形式,我想在中心显示这个模态,我正在尝试使用一些 CSS 但它没有帮助,任何形式的帮助表示赞赏。这是我的代码
<div class="modal fade" ID="success" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" style="BACkground: #1ab394;
border-top-left-radius: 5px;
border-top-right-radius: 5px;">
<button type="button" class="close" data-dismiss="modal"
style="opacity:1;color:#fff;">×</button>
<h4 class="modal-Title TEXT-center"><img
src="https://lh3.Googleusercontent.com/-Zxh4srAEtU0/Wp0cZV-PJuI/AAAAAAAAD4E/En5x5c53s44jzvG8M0sSyFZXoRhGXfBzwCL0BGAYYCw/h100/2018-03-05.png"
alt=""></h4>
</div>
<div class="modal-body">
<p style="text-align:center;color:#1ab394;Font-size:24px;Font-weight:500;">Cheers! Payment
successful!</p>
<p style="color:#555555;">transaction ID: <strong
style="Font-weight:500;Font-size:16px;color: #222222;">152458258752515</strong><br>Payment
amount: <strong
style="Font-weight:500;Font-size:16px;color: #222222;">Rs.35000</strong><br>The above rent shall
credited to your landlord's bank account in<strong
style="Font-weight:500;Font-size:15px;color: #222222;"> 3 working days</strong></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
<
/div>
我正在尝试的CSS是这样的:-
.modal {
text-align: center;
padding: 0!important;
}
.modal:before {
content: '';
display: inline-block;
height: 100%;
vertical-align: mIDdle;
margin-right: -4px; /* Adjusts for spacing */
}
.modal-dialog {
display: inline-block;
text-align: left;
vertical-align: mIDdle;
}
如果你想垂直居中,那么你可以简单地通过 flexbox 来实现。因此,在您的文档中添加其他样式:
=ARRAYFORMULA(TEXT(SUM(TIMEVALUE(E4:E93)),"[hh]:mm"))
以上是大佬教程为你收集整理的如何使用 css 在中心对齐 Modal 表单?全部内容,希望文章能够帮你解决如何使用 css 在中心对齐 Modal 表单?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。