1. Using absolute positioning
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%;
}
other
Collating my own learning process read books and other books ready to watch, we want to help, the next will continue to update up new books:
tc5.us/dir/24655972-37630821-7fb57f