.parent-box{ /*弹性盒模型*/ display:flex; /*主轴居中对齐*/ justify-content: center; /*侧轴居中对齐*/ align-items: center; }