这里是我的工作with我如何获得一个div从上面的div伸展到它下面的div?
代码:
header {
width: 100%;
background: yellow;
position: fixed;
top: 0;
height: 60px !important;
}
.content {
margin-top: 60px;
background: pink;
min-height: 100%;
width: 100%;
}
footer {
width: 100%;
background: yellow;
position: fixed;
bottom: 0;
height: 30px;
}
<header>
header
</header>
<div class="content">
content-main
<br />
</div>
<footer>
footer
</footer>
我想粉色位延伸到顶部和底部。我不在乎滚动条是用于粉色内容div还是body div。我只需要我填写整个页面并在溢出时滚动。
我有一个额外的限制是,如果页脚被动态删除,我希望粉红色的内容仍填充所有空白空间。
废我的答案,去与@dippas – Digedu