<!DOCTYPE html>
<html lang="enabled">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>圣杯布局</title>
<style>
*{margin: 0;
padding:0;
}
html,body{
height: 100%;
}
body{
display: flex;
flex-direction: column;
}
header{
width: 100%;
height: 100px;
background-color: blanchedalmond;
}
main{
width: 100%;
background-color: rgb(211, 255, 205);
display: flex;
flex: 1;
}
aside{
width: 100px;
height: 100%;
background-color: rgb(117, 230, 230);
}
footer{
width: 100%;
height: 100px;
background-color: rgb(239, 205, 255);
}
article{
width: 100px;
height: 100%;
background-color: rgb(117, 230, 164);
}
section{
width: 100%;
height: 100%;
flex:2
}
</style>
</head>
<body>
<header>
头部
</header>
<main>
<aside>
左侧
</aside>
<section>
中
</section>
<article>
右侧
</article>
</main>
<footer>底部</footer>
</body>
</html>
css圣杯布局
最新推荐文章于 2024-10-13 17:00:37 发布