display: flex
父容器属性:
flex-direction: 排列方向 (row, row-reverse, column, column-reverse)
flex-wrap: 换行方式 (nowrap, wrap, wrap-reverse)
justify-content: 主轴对齐方式 (flex-start, center, flex-end, space-between, space-around, space-evenly)
align-items: 交叉轴对齐 (stretch, flex-start, center, flex-end, baseline)
align-content: 多行对齐方式 (同align-items,适用于多行)
gap: 项目间距 (如10px或10px 20px)
子项目属性:
flex: 增长缩小比例和基础尺寸 (如1, 1 0, 1 1 auto)
align-self: 单独对齐方式,覆盖align-items
order: 显示顺序 (数值越小越靠前)
本文来自博客园,作者:熬夜的布偶猫#,转载请注明原文链接:https://www.cnblogs.com/prince11/p/18890261