We can center a
使用flexbox的最流行的居中div的方法是结合justify-content和align-items属性。
justify-content属性会水平居中对齐div。
align-items属性将div垂直居中对齐。
If you want to center align only in one direction, i.e., either vertically or horizontally, we should use only one among the properties we mentioned.
Use the align-items and the justify-contents to center align the child horizontally and vertically.
This is the child element.