1、直接上代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>flexbox</title>
<style>
body {
margin: 0;
padding: 0;
}
.container {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.header{
background: #008c8c;
color: #fff;
height: 60px;
box-sizing: border-box;
}
.main{
flex: 1;
background: #004c4c;
display: flex;
}
.footer