答案 0 :(得分:1)
您可以使用flexbox - 只需将flex-grow添加到最后一个子节点,它将占用该行的其余部分
* {
box-sizing: border-box;
}
.container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
margin-bottom:30px;
}
.item {
flex-basis:33.333333%;
border:1px solid black;
}
.item:last-child {
flex-grow:1
}

<div class="container">
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
</div>
<div class="container">
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
</div>
<div class="container">
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
<div class="item">1</div>
</div>
&#13;