在相对的空间内,垂直居中。position: relative;top: 50%;transform: translateY(-50%);
无论内容怎么增加,全文都是垂直居中的。
transform translateY(-50%) 实现元素垂直居中效果
原文:http://www.cnblogs.com/peko/p/7473219.html