首先,将容器设置为绝对定位
再次,设置top:50%;left:50%;
最后,设置margin-top:-高度/2;margin-left:-宽度/2
这样就居中啦,自己先学习下,慢慢积累,慢慢实践。