垂直水平居中:绝对定位方式且已知宽高

5年以前  |  阅读数:456 次  |  编程语言:HTML/CSS 
position: absolute;
top: 50%;
left: 50%;
margin-top: -3em;
margin-left: -7em;
width: 14em;
height: 6em;

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8