垂直居中的几种方式
//方式一 transformelement.style { position: absolute; left: 50%; top: 50%; background: yellow; z-index: 1; transform: translate3d(-50%,-50%,0);}//方式二 table.box1{ text-align: center; width: 100%; display: table; background: blue;}.box1> span {display: table-cell;vertical-align: middle;}//方式三 flexdiv.parent{ display:flex;}div.child{ margin:auto;}//2.box1{display: flex;justify-content: center;align-items: center;}