第一种:定位布局 ```css position: relative; top: 0; left: 50%; transform: translate(-50%,0); ``` 第二种:弹性布局 ```css display: flex; align-items: center; justify-content: center; ```