设置一个块水平和垂直居中: 把父级设置position:relative; 要居中的块设置position:absolute; top:0;bottom:0;left:0;right:0;margin:auto;