Hello! When p has no width or height, and there are no width-height elements or text content in it, the p will not be displayed, but float will still take effect.
Failure situation: Two ps at the same level, the first one is set with float:left, and the second one is not set, the first one will be out of the document flow, which means that the second p ignores the existence of the first one. Will overlap
Hello! When p has no width or height, and there are no width-height elements or text content in it, the p will not be displayed, but float will still take effect.
Failure situation: Two ps at the same level, the first one is set with float:left, and the second one is not set, the first one will be out of the document flow, which means that the second p ignores the existence of the first one. Will overlap
What do you mean by failure?
Currently we only know that float does not take effect when absolute positioning and display is none. I hope other experts can answer the questions
Invalid when using absolute positioning
Display:flex will also fail, you can use margin-left:auto to solve it