Use justify content: space between; to set the spacing. Child elements can be separated by flex basis. The following example takes percentage as an example. You can also specify the pixel width. https://codepen.io/jylzs369/p...
<div style="display:flex;">
<div style="flex:1;margin-right:10px;"></div>
<!-- 我想让这里有间距 -->
<div style="flex:1;"></div>
</div>
Set child elements flex:1; Then set the margin except the last one
justify-content: center;
In this way, the two divs will be in the middle, and then the margin can be used to adjust the spacing;