CSSのflexboxでjustify-contentのspace-betweenが効かないサンプル
justify-content: space-between
最後のdivにmargin-rightが指定されている
justify-content: space-around
::before, ::after content: ""
<section>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</section>
<section>
<div></div>
<div></div>
<div></div>
<div></div>
<div class="s1"></div>
</section>
<section class="s2">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</section>
<section class="s3">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</section>
section {
display: flex;
justify-content: space-between;
width: 300px;
margin-bottom: 30px;
background: #fff333;
}
section > div {
width: 40px;
height: 40px;
background: #f00;
}
.s1 {
margin-right: 10px;
}
.s2 {
justify-content: space-around;
}
.s3::before,
.s3::after {
content: "";
}