直接上页面代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
<title>flex hello</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
display: flex;
height: 100vh;
flex-direction: column;
}
main {
background-color: #ddd;
flex: 1;
}
footer {
background-color: yellowgreen;
height: 60px;
display: flex;
justify-content: space-between;
}
footer div {
flex: 1;
line-height: 3em;
text-align: center;
}
footer div:nth-child(n+2)
{
border-left: solid 2px yellow;
}
</style>
</head>
<body>
<main>aaa</main>
<footer>
<div>tab内容1</div>
<div>tab内容2</div>
<div>tab内容3</div>
<div>tab内容4</div>
</footer>
</body>
</html>