flex 的封装和简化

本文探讨了在前端开发中如何对Flex布局进行封装和简化,通过创建自定义组件,实现更便捷、灵活的布局管理。内容包括Flex基础概念、布局问题解决、封装组件的设计思路及其实现方法,旨在提升前端开发效率。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


.COL{
	display:flex;
	flex-direction:column;
	height:100vh;
	width:100vw;
}
.flex{
	display:flex;
}	
.col{
	display:flex;
	flex-direction:column;
}	
.Content{
	flex:1;
	overflow:auto;
}	
.absolute{
	background:white;
	position:absolute;
	width:100vh;
	height:100vh;
	top:0;
}	
.A{
	display:flex;
	width:100vw;
	justify-content:space-around;
}
.C{
	display:flex;
	width:100vw;
	justify-content:center;
}	
.B{
	display:flex;
	width:100vw;
	justify-content:space-between;
}
.E{
	display:flex;
	width:100vw;
	justify-content:flex-end;
}	
.AS{
	display:flex;
	height:100vh;
	width:100vw;
	justify-content:space-around;
	flex-direction:column;
}
.CS{
	display:flex;
	height:100vh;
	width:100vw;
	justify-content:center;
	flex-direction:column;
}	
.BS{
	display:flex;
	height:100vh;
	width:100vw;
	justify-content:space-between;
	flex-direction:column;
}
.ES{
	display:flex;
	height:100vh;
	width:100vw;
	justify-content:flex-end;
	flex-direction:column;
}	
.Ac{
	display:flex;
	width:100vw;
	justify-content:space-around;
	height:100vh;
	align-items:center;
}	
.Ae{
	display:flex;
	width:100vw;
	justify-content:space-around;
	height:100vh;
	align-items:flex-end;
}	
.Bc{
	display:flex;
	width:100vw;
	justify-content:space-between;
	height:100vh;
	align-items:center;
}	
.Be{
	display:flex;
	width:100vw;
	justify-content:space-between;
	height:100vh;
	align-items:flex-end;
}	
.Cc{
	display:flex;
	width:100vw;
	justify-content:center;
	height:100vh;
	align-items:center;
}	
.Ce{
	display:flex;
	width:100vw;
	justify-content:center;
	height:100vh;
	align-items:flex-end;
}	
.Ec{
	display:flex;
	width:100vw;
	justify-content:flex-end;
	height:100vh;
	align-items:center;
}	
.Ee{
	display:flex;
	width:100vw;
	justify-content:flex-end;
	height:100vh;
	align-items:flex-end;
}	
.AC{
	display:flex;
	width:100vw;
	justify-content:space-around;
	height:100vh;
	flex-direction:column;
	align-items:center;
}	
.AE{
	display:flex;
	width:100vw;
	justify-content:space-around;
	height:100vh;
	flex-direction:column;
	align-items:flex-end;
}	
.BC{
	display:flex;
	width:100vw;
	justify-content:space-between;
	height:100vh;
	flex-direction:column;
	align-items:center;
}	
.BE{
	display:flex;
	width:100vw;
	justify-content:space-between;
	height:100vh;
	flex-direction:column;
	align-items:flex-end;
}	
.CC{
	display:flex;
	width:100vw;
	justify-content:center;
	height:100vh;
	flex-direction:column;
	align-items:center;
}	
.CE{
	display:flex;
	width:100vw;
	justify-content:center;
	height:100vh;
	flex-direction:column;
	align-items:flex-end;
}	
.EC{
	display:flex;
	width:100vw;
	justify-content:flex-end;
	height:100vh;
	flex-direction:column;
	align-items:center;
}	
.EE{
	display:flex;
	width:100vw;
	justify-content:flex-end;
	height:100vh;
	flex-direction:column;
	align-items:flex-end;
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值