📜  如何使 div 垂直和水平居中 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:48:01.148000             🧑  作者: Mango

代码示例6
.parent{
    display: flex;
    justify-content: center;
      align-items: center;
}
/* Child elements will be perfectly centered automatically */