1.使用绝对定位
html
<div class="wrap">
<div class="header">头部</div>
<div class="main">
<div class="container">内容</div>
</div>
<div class="footer">尾部</div>
</div>
css
html,body{
width:100%;
height:100%;
}
.wrap{
width:100%;
height:100%;
}
.header,.footer{
height:40px;
}
.main{
display:flex;
postion:relative;
}
.container{
position:absolute;
width:100%;
height:100%;
}
其他
整理收集了我自己学习过程中看过的书籍和一些其他准备看的书籍,希望对大家有帮助,接下来还会陆续更新上去新的书籍:
tc5.us/dir/24655972-37630821-7fb57f