<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>css3flexbox布局</title>
<style type="text/css">
*{margin:0;padding:0;}
header{width:80%;margin:100px auto;height:300px;display:flex;/*采取的是flexbox布局模式*/
flex-flow:row;/*row行,column:列*/}
section:first-child{height:100%;background: red;flex:2;}
section:nth-child(2){height:100%;background:green;flex:2;}
section:last-child{height:100%;background: blue; flex:2;}
</style>
</head>
<body>
<header>
<section></section>
<section></section>
<section></section>
</header>
</body>
</html>
css3 flexbox布局
最新推荐文章于 2025-05-03 16:19:26 发布
本文介绍了一个使用 CSS3 的 Flexbox 布局的实际案例,演示了如何通过简单的 HTML 结构和 CSS 样式实现三个等高区块并排显示的效果,并详细解释了 flex-flow 属性的作用。
1566

被折叠的 条评论
为什么被折叠?



