align-items:center; //可以使内容竖直居中 justify-content:center; //可以使内容水平居中 例子 1.代码 html代码: <div class = "flex-box"> <div class = "content-box"