请问一下 为什么img标签加上左浮动之后 它原本在下面的东西就能跑到img的右边去呢?
我记得p1和p2,假如把p1加上左浮动的时候,那这时不是应该是p1覆盖了一部分p2的吗?求高手解答一下 谢谢!
这和标签什么默认属性有关系的吗 ?
黄舟2017-04-17 14:33:31
MDN Documentation
W3C Document
Maybe float was originally set to achieve text wrapping effect
伊谢尔伦2017-04-17 14:33:31
Text elements and inline elements will be placed around floating elements, while block-level elements will fill the gaps before floating elements. I don’t know the specific reason why
迷茫2017-04-17 14:33:31
Two block elements are arranged from top to bottom. One floats to the left and the other naturally floats over