一个div在另一个div中垂直居中的方法

.parent {
            800px;
            height:500px;
            border:2px solid #000;
            display:flex;
            justify-content:center;
            align-items:center;
        }
 .child {
            200px;
            height:200px;
            background-color: red;
        }
原文地址:https://www.cnblogs.com/mmjoy/p/9694019.html