大屏-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;
		}
相关推荐
神奇的代码在哪里1 小时前
AI编程时代,PPT已成为过去,单个HTML文件创造无限可能
javascript·html·powerpoint·ai编程·ppt
杨超越luckly1 小时前
Agent 应用指南:基于 OurAirports 的中国机场设施数据可视化
python·html·github·可视化·机场设施
用户059540174461 小时前
用了半年 LangChain Memory,才发现记忆总“串台”——3 个自动化测试避坑指南
前端·css
志尊宝1 小时前
Vue3 环境搭建 + 第一个 HelloVue 项目(零基础入门)
vue.js·node.js·vue·css3
More more2 小时前
纯手搓css样式:科技感弹窗边框
css·科技·css3
stereohomology3 小时前
已进入初赛提交Demo的两个项目:(2)单独html钢琴
前端·html·why不coding
kidding72320 小时前
旋转大转盘小程序
前端·css·微信小程序·小程序·前端框架
你怎么知道我是队长20 小时前
html的注释写法
html
甜美的小天鹅1 天前
TDD in HTML & JavaScript 概述
javascript·html·tdd
AI行业学习1 天前
Notepad++ 官方纯净下载+完整安装教程(Windows)【2026.7.5】
开发语言·windows·python·前端框架·html·notepad++