在CSS样式中添加如下属性: top: 50%; left: 50%; margin-top: -60px;(其中60px是自身高度的一半) margin-left: -200px;(200px是自身宽度的一半)