flex:align-items和align-content的区别
align-content的属性值 比align-items多了两个:space-around、space-between
当flex container内flex items只有一行时
当flex container内flex items有多行时
align-items
#father { display: flex; flex-direction: column; flex-wrap: wrap; background-color: white; border: 1px black solid; height: 500px; width: 100%; justify-content:center; align-items: flex-end; /* align-content:flex-end; */ }
align-content
align-content
如下图,两列小盒子作为内容的整体在交叉轴的end对齐。
#father { display: flex; flex-direction: column; flex-wrap: wrap; background-color: white; border: 1px black solid; height: 500px; width: 100%; justify-content:center; /* align-items:flex-end; */ align-content:flex-end; }