这里是页:http://aevm.ca/fond2.html水平居中
当我使用这个CSS: 它的左对齐和顶在零
#center {
height: 100%;
width: 960px;
position: absolute;
background-color: #FF0;
top: 0px;
margin-right: auto;
margin-left: auto;
}
当我使用这个CSS: 它的中心对齐和顶部10 -20像素(为什么?)
#center {
height: 100%;
width: 960px;
position: relative; (the only difference)
background-color: #FF0;
top: 0px;
margin-right: auto;
margin-left: auto;
}
我怎么能得到顶级位置和水平中心?
a-ma-zig catch!...做到了! – menardmam 2011-01-24 22:44:51