div 居中CSS实现

.login-box {
position: absolute;
border: solid #E3EAE7 1px;
top: 50%;
left: 50%;
margin: -100px 0 0 -150px;
width: 300px;
height: 200px;
padding: 10px;
}



<div class="login-box">
</div>

  

posted @ 2016-01-13 12:56  雪卜  阅读(160)  评论(0编辑  收藏  举报