我的 Bootstrap 模态在模态的顶部和底部出现蓝线。我不知道为什么蓝线出现在模态框的顶部和底部。我想删除蓝线。我的英语很弱,如果我犯了任何语法或拼写错误,请向我道歉。
HTML 代码:
<div class="modal fade bs-example-modal-sm vcenter" id="deleteconfirmation" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" style="text-align:center">Are you sure you want to Delete it?</h4>
</div>
<div class="modal-body">
<div class="form-group" style="text-align:center">
<h6>By clicking on Yes button your ad will be Delete.</h6>
</div>
</div>
<div class="modal-footer" style="text-align:center">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button type="button" class="btn btn-primary" id="sayyes">Yes</button>
</div>
</div>
</div>
</div>
CSS 代码:
.vcenter{
position: relative;
top: 50%;
transform: translateY(-50%);
}
最佳答案
只需添加此样式 style="outline: none !important"
到你的主分区。
<div class="modal fade bs-example-modal-sm vcenter" id="deleteconfirmation" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" style="outline: none !important">
蓝线将消失。
关于javascript - Bootstrap 模式未按我的要求显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40582202/