让div水平垂直居中div水平并垂直居中<pre<code<!1.上下左右0,margin是auto2.上左50%,平移50%3.弹性盒布局display:flex;justifycontent:center;alignitems: