1.0 flex-grow: 1 元素根据空间均匀相等宽度分布
article * {
flex-grow: 1;
width: 100px;
height: 100px;
}
Jietu20200101-155125.jpg
2.0 flex-grow: 设置不同数值实现不同子元素宽度分布
article div:nth-child(1) {
flex-grow: 0; // 代表原来的宽度
}
article div:nth-child(2) {
flex-grow: 1;
}
article div:nth-child(3) {
flex-grow: 3;
}

网友评论