div{
width:200px;
height:100px;
position:absolute;
left:50%; /*以父级宽度为准*/
top:50%;
translate:transform(-50%,-50%); /*以自身宽度为准*/
}
div{
width:200px;
height:100px;
position:absolute;
left:50%; /*以父级宽度为准*/
top:50%;
translate:transform(-50%,-50%); /*以自身宽度为准*/
}