问题描述
我尝试删除模式底部的空间没有成功:
I tried with no success to remove some space at the bottom of a Modal:
<div class="modal fade" id="ModalDetails" role="dialog" >
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content" style="background-color:red;margin:0px;padding:0px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><i class="fa fa-user-plus fa-3x pad-r-10"></i>Informations détaillées d un compte</h4>
</div>
<div class="modal-body pad-0">
<iframe id="If_accountdetails" name="If_accountdetails" width="100%" height="400" style="overflow-x:hidden !important;border: 0px;" class="noborder" src="about:blank"></iframe>
</div>
</div>
</div>
尽管有边距和填充到0px,我们仍然可以看到与模态内容相对应的红线:带空格的模块(红色)
We can see a red line corresponding to the modal-content despite a margin and a padding to 0px:Modal with space (red)
有人知道如何删除此空间吗?
Does anyone know how to remove this space?
谢谢.
推荐答案
这有点猜测(请提供一些CSS),但是我认为问题是 iframe
. iframe
是嵌入式框架",因此它们受行高,垂直对齐方式和空白影响.尝试将 display:block
添加到 iframe
中以覆盖此行为,并且红色间隙应该消失.
This is a bit of a guess (please provide some CSS), but I'd assume the issue is the iframe
. iframe
s are "inline frames", so they are affected by line height, vertical alignment, and whitespace. Try adding display:block
to the iframe
to override this behavior and the red gap should disappear.
这篇关于Bootstrap模式删除了底部的一些空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!