我想知道,如何使用CSS和960.gs将div水平和垂直地带到屏幕的中心
发布于 2012-05-05 18:59:10
960.gs不是相对居中(即使用百分比)。这是关于选择页面的宽度(在本例中为960px)并将其分割。你可以通过选择你想要开始的网格和宽度来“居中”div(总网格-开始网格)。
对于简单的水平居中您的网格本身,您可以执行960.gs演示中的操作:
.container_12 {
margin-left: auto;
margin-right: auto;
width: 960px;
}发布于 2012-05-05 18:48:54
div {
position:absolute;
left: 50%;
top: 50%;
width:""px;
height:""px;
margin:half the length of width; half the length of height;
}https://stackoverflow.com/questions/10461011
复制相似问题