<style>
html,body{
margin:0px;
height:100%;
}
.container {
height: 100%;
}
.c2{
width:100%;
background:#09F;
display: flex;
justify-content: center;
align-items: center;
}
.alert {
border: 1px solid #f00;
}
</style>
<div class="container c2" >
<div class="alert">
<p>啦啦啦</p>
<p>啦啦啦</p>
<p>啦啦啦</p>
<p>啦啦啦</p>
<p>啦啦啦</p>
<p>啦啦啦</p>
</div>
</div>
弹框上下居中