大屏-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;
		}
相关推荐
加个鸡腿儿2 小时前
经验分享2:SSR 项目中响应式组件的闪动陷阱与修复实践
前端·css·架构
华仔啊3 小时前
写 CSS 用 px?这 3 个单位能让页面自动适配屏幕
前端·css
菩提小狗4 小时前
Sqli-Labs Less-3 靶场完整解题流程解析-豆包生成
前端·css·less
智航GIS4 小时前
10.5 PyQuery:jQuery 风格的 Python HTML 解析库
python·html·jquery
Pilot-HJQ8 小时前
固定 Element UI 表格表头的方法(超简单)
vue.js·学习·css3·html5
web小白成长日记9 小时前
CSS 作用域隔离实战:React、Vue 与 Styled Components 的三种范式
前端·css·vue.js·react.js
@@小旭21 小时前
实现头部Sticky 粘性布局,并且点击菜单滑动到相应位置
前端·javascript·css
Irene19911 天前
CSS 定位属性(relative、absolute、fixed、sticky)与实用技巧总结
css
我的写法有点潮1 天前
推荐几个国外比较流行的UI库(上)
前端·javascript·css
m0_502724951 天前
vue动态设置背景图片后显示异常
前端·css