0
如何垂直居中放置此Bootstrap容器div?我想要它,所以我查看它在页面上垂直居中的页面,黑色在我的div上下。如何垂直居中Bootstrap容器?
演示:https://jsfiddle.net/yunr225g/
HTML:
<div class="container">
<div class="row">
<div class="col-md-6 text-center">
<img src="http://placehold.it/250x250">
<button type="submit">Stay</button>
</div>
<div class="col-md-6 text-center">
<img src="http://placehold.it/250x250">
<button type="submit">Leave</button>
</div>
</div>
</div>
CSS:
body {
margin: 10px;
background:black;
}
button {
display:block;
text-align:center;
margin:0 auto;
margin:60px auto;
background:black;
border:2px solid #ffca00;
padding:30px;
width:250px;
color:#ffca00;
text-transform:uppercase;
}