<body style="width: 100%; text-align: center;">
<div style="margin: 0 auto;">container
<div style="width: 200px; margin-top: 100px; float: left;">
left
</div>
<div style="width: 728px; float: left;">
<div style="height: 100px;">
1
</div>
<div style="height: 150px;">
2
</div>
<div style="margin-bottom: 0; bottom: 0; height: 100%;">
3
</div>
</div>
</div>
</body>
DIV 1
有固定的高度,
DIV 2
通过 jQuery 改变高度
DIV 3
必须尽可能地拉伸(stretch),在 2
之后向下延伸到 bottom: 0;
3
中缺少哪些样式?
我还希望 container
居中。
最佳答案
这可以在没有 Javascript 的情况下使用 css 表格
关于css - 绑定(bind)到底部的 div 的最大高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17466131/