在绝对定位中进行水平垂直居中的两种方法
1.这种方法最常用,适合固定长宽的块级元素
<pre name="code" class="css" style="font-size: 18px; font-weight: bold;">{
width:300px;
height:200px;
left:50%;
top:50%;
margin-top:-100px;
margin-left:-150px;
}<<pre name="code" class="css" style="font-size: 18px; font-weight: bold;">{
width:300px;
height:200px;
left:50%;
top:50%;
margin-top:-100px;
margin-left:-150px;
}<