Skip to main content

flex 的 align-self

align-self 属性定义 flex 子项单独在侧轴(纵轴)方向上的对齐方式。

居中对齐弹性对象元素内的某个项

#myBlueDiv {
align-self: center;
}

尝试一下