position:absolute;top:50%;left:50%;margin:-200px 0 0 -250px;
200 是 height 的一半
250 是 width 的一半
position:absolute;top:50%;left:50%;margin:-200px 0 0 -250px;
200 是 height 的一半
250 是 width 的一半
转载于:https://www.cnblogs.com/ganfengzi/archive/2013/03/02/2940025.html