如何使文字和图片垂直居中对齐 /*你的父容器*/ .box{ display:flex; align-items: center;//子元素垂直居中 justify-content: center;//子元素水平居中 }