</p>
</p>
CSS代码:
.flex{
/*flex 布局*/
display: flex;
/*实现垂直居中*/
align-items: center;
/*实现水平居中*/
justify-content: center;
text-align: justify;
width:200px;
height:200px;
background: #000;
margin:0 auto;
color:#fff;
}
div垂直居中CSS几种方法(2):http://www.youerw.com/fanwen/lunwen_81469.html