如何使第二个div streatch到它的所有垂直位置。它必须“照顾”他上面的div的下边距和所有页面的下边距。如何让它填满所有的地方?里面会有正常的内容,我会使页面,将水平滚动,我需要它来适应各种用户的Y分辨率。底部边距将是恒定的。我真的很想在其中避免使用js。
发布于 2012-10-13 21:05:06
#rest {
background-color:blue;
height:100%;
position:relative;
top:0;left:0;
bottom:0;right:0;
}
html, body {
height:100%;
}
你的代码
#rest {
background-color:blue;
height:100%;
position:relative;
top:0;
left:0;
bottom:0;
right:0;
height:auto;
}
包含两个time height
。最后删除height:auto;
https://stackoverflow.com/questions/12876907
复制