Line break problem of css float layout style

When using float layout, there are multiple rows of data that need to be wrapped, and a line wrapping style problem occurs:

As shown in the picture:

The first one in the second row is floated to the right, and the others are squeezed down to the third row.

Reason: A floating box can be moved left or right until its outer edge touches the containing box or another floating border.

Solution:

The second line is the first to add the clear floating style:  style="clear:both;"

Normal style:

 

Remark:

In the picture above, my start button is written in another div, and the floating style also needs to be cleared, otherwise it will follow the red delete button.

Guess you like

Origin blog.csdn.net/weixin_44220845/article/details/124254555