flex布局 一行4个元素 后面不够4个元素对齐
html
父元素
.container {
display: flex;
flex-wrap: wrap;
}
子元素
.list {
width: 24%; height: 100px;
background-color: skyblue;
margin-top: 15px;
}
.list:not(:nth-child(4n)) {
margin-right: calc(4% / 3);
}