我有3个带有id的div分别是
header
、content
和footer
。头部和底部具有固定的高度,并且它们被设计为浮动在顶部和底部。我希望使用jquery自动计算中间的content
高度。如何实现这一点?#header {
height: 35px;
width: 100%;
position: absolute;
top: 0px;
z-index: 2;
}
#footer {
height: 35px;
width: 100%;
position: absolute;
bottom: 0px;
z-index: 2;
}
position:fixed
属性吗? - Šime Vidas:)
- Alfredheight: 100%
。然后它应该可以正常工作。 - Mavelo