Centering Dynamic div
This question already has an answer here:
Try this:
.exactCenter {
position: absolute;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 200px;
height: 100px;
background-color: #ccc;
border-radius: 3px;
}
There's lot of different ways to do it - this is just a simple example
链接地址: http://www.djcxy.com/p/75880.html上一篇: 垂直居中页面上的元素
下一篇: 居中动态div