The display displays block, after the element floats in css, but why does it behave more like an inline block element?

After

element floats, display is block . If the width and height are not set, the width of block-level elements will shrink, which behaves more like inline block elements.

so why does display show block instead of inline-block after floating?

Jan.21,2022

suggest that you can take a look at Zhang Xinxu's explanation of float.
https://www.zhangxinxu.com/wo.

Menu