css中align-content属性有什么用
这篇文章给大家分享的是有关css中align-content属性有什么用的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。
1、align-content可以看成是和justify-content是相似且对立的属性,是指垂直方向每一行 flex子项的对齐和分布方式。
2、只适用于多行的flex容器,并且当交叉轴上有多余空间使flex容器内的flex线对齐。
实例
<style type="text/css"> *{ margin:0px; padding: 0px; } div{ border: 1px solid #0f0f0f; } .child-1{ margin: 30px auto; display: flex; width: 100px; height: 60px; justify-content: space-around; align-content: center; } .child-2{ width: 30px; height: 20px; } </style>
感谢各位的阅读!关于“css中align-content属性有什么用”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!