は、このコード
HTML
<div class="container">
<h2>Modal Example</h2>
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog myModal">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Modal Header</h4>
</div>
<div class="modal-body">
<p>Some text in the modal.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
CSS
.myModal
{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin:auto;
display:table;
max-width:50%;
}
.myModal .modal-content
{
display:table-cell;
}
ほとんど同じコードを試してみてください。 /:私はこのことができます link for reference 希望は.. モーダルダイアログとCSSをブートストラップポップアップmodel.Pleaseは、このリンクをたどっ `HTTPSに適用するCSSで
問題をmyModalクラスが追加されました/ codepen.io/dimbslmh/full/mKfCc' –
これは実際にはブートストラップの一般的な問題です。 [this](https://stackoverflow.com/questions/18422223/bootstrap-3-modal-vertical-position-center)の重複した質問をご覧ください。最も受け入れられる答えは、@ ManjeetThakur(https://codepen.io/dimbslmh/full/mKfCc) – Dana