div adapts to occupy the remaining width; when width:100% is not applicable

Because I plan to put the button in the red box in the picture below at the end of this row

 But when I give the div in the button a width of 100%, the following picture will appear, that is, the position will be messed up

 Later, change width:100%; to flex-grow: 1; the effect is as follows

 

 flex-grow:

 For details, please refer to flex-grow - CSS: Cascading Style Sheets | MDN (mozilla.org)

Guess you like

Origin blog.csdn.net/weixin_57997644/article/details/130607372