大屏-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;
		}
相关推荐
共享家95271 天前
搭建 AI 聊天机器人:”我的人生我做主“
前端·javascript·css·python·pycharm·html·状态模式
搬砖的阿wei2 天前
CSS常用选择器总结
前端·css
web打印社区2 天前
vue页面打印:printjs实现与进阶方案推荐
前端·javascript·vue.js·electron·html
RFCEO2 天前
前端编程 课程十二、:CSS 基础应用 Flex 布局
前端·css·flex 布局·css3原生自带的布局模块·flexible box·弹性盒布局·垂直居中困难
放飞自我的Coder2 天前
【Mermaid本地实时渲染 单html本地直接运行】
html·mermaid
共享家95272 天前
打造AI智能”成语接龙“游戏
前端·javascript·人工智能·python·游戏·html
AAA阿giao2 天前
HTML5模块化开发:结构、样式与交互分离
前端·html·html5
ziblog2 天前
HTML5 Canvas梦幻背景动画特效
前端·css
顾西爵霞2 天前
HTML 零基础入门:像搭积木一样建网页
前端·html
顾西爵霞2 天前
HTML 进阶:给房子装窗户、通道和前台系统
前端·javascript·html