1. 父级相对定位,子级绝对定位不占空间,然后top: 50% ; transform: translateY(-50%);
2. 父级flex布局, 子级justify-content:center;