<div style="position:absolute:top:50%;margin-top:-(元素高度)/2;left:50%;margin-left:-(元素宽度)/2;">(其中负值时为了抵消元素自身的高度和宽度)
绝对定位让元素居中
原文:http://www.cnblogs.com/wangrongxiang/p/5177732.html