大屏-flex布局

复制代码
<div class="container">
			<div class="title">标题</div>
				<div class="content">
					<div class="item">
					</div>
					<div class="item" style="width: calc((100% - 30) / 3 * 2)">
					</div>
					<div class="item">
					</div>
					<div class="item">
					</div>
					<div class="item">
					</div>
					<div class="item">
					</div>
					<div class="item">
					</div>
					<div class="item">
					</div>
				</div>
			</div>
		</div>

html,body{
			margin: 0;
			padding: 0;
			width: 100%;
			height: 100%;
		}
		.container{
			width: 100%;
			height: 100%;
		}
		.title{
			text-align: center;
			width:100%;
			height: 50px;
			line-height: 50px;
			background-color: #ccc;
			color: #fff;
		}
		.content{
			width: 100%;
			height: calc(100% - 50px);
			background-color: #fff;
			padding: 5px;
			box-sizing: border-box;
			display: flex;
			flex-wrap: wrap;
			align-content: flex-start;
		}
		.item{
			flex: 1;
			width: calc((100% - 30px) / 3);
			min-width: calc((100% - 30px) / 3);
			max-width: calc((100% - 30px) / 3);
			background-color: #ccc;
			margin: 5px;
			height: 300px;
		}
相关推荐
song5014 小时前
React Native for OpenHarmony 实战:三方库 react-native-css-transformer 的鸿蒙化适配指南
css·人工智能·深度学习·react native·transformer
溪语流沙1 天前
【每天一个CSS | Day18】会摆动的拟物怀表:黄铜、皮革与催眠摆
前端·css3·html5
传人once1 天前
选择文件按钮样式如何美化
前端·html·css3·jquery·html5
Lucky_Turtle1 天前
【HTML】前端页面禁止缩放
前端·html
思码梁田1 天前
CSS transform 转换详解:translate、rotate、scale、skew 与 3D 变换一次讲清
前端·css·transform·skew·scale·translate·rotate
三天不学习2 天前
Tailwind CSS 快速入门(2026 版):从 v4 零配置上手,到「该不该用、怎么用好」的选型实战
前端·css·tailwind
htzyl2062 天前
前端阶梯——第九章、颜色、文本与背景
前端·css
htzyl2062 天前
前端阶梯——第八章、CSS入门与选择器
前端·css
JYeontu2 天前
实现一个「曲线滑块验证」功能
前端·javascript·html
IMPYLH2 天前
HTML 的 <tr> 元素
前端·html