css

position:absolut;

left:50%;

top:50%;

margin-left:  -(自身一半宽度);

margin-top: -(自身一半高度)

原文地址:https://www.cnblogs.com/500m/p/12695508.html