<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.block{
width: 800px;
height: 800px;
background-color: #3d98ff;
margin: 10px auto;
display: flex;
flex-direction: column;
}
header{
width: 100%;
height: 200px;
background-color: #ff4fe9;
}
main{
display: flex;
width: 100%;
flex: 1;
background-color: #53ff36;
}
main>article
{
height: 100%;
flex: 1;
background-color: red;
}
main>aside
{
height: 100%;
flex: 3;
background-color: #ffc053;
}
footer
{
width: 100%;
height: 200px;
background-color: #9fff9d;
}
</style>
</head>
<body>
<div class="block">
<header></header>
<main>
<article></article>
<aside></aside>
</main>
<footer></footer>
</div>
</body>
</html>
伸缩布局
最新推荐文章于 2021-06-15 14:52:23 发布