div 绝对布局居中
#loginbg{
position:absolute;
height:200px;
width:400px;
margin:-100px 0px 0px -200px;
top: 50%;
left: 50%;
}
<div id="wrap">
<div id="loginbg">
</div>
</div>
#loginbg{
position:absolute;
height:200px;
width:400px;
margin:-100px 0px 0px -200px;
top: 50%;
left: 50%;
}
<div id="wrap">
<div id="loginbg">
</div>
</div>