What is the difference between Float:left vs Display:inline? While every element in browser goes to left by default

后端 未结 8 2029
星月不相逢
星月不相逢 2020-12-01 04:28

What is the differences between Float vs Display:inline? by default everything goes to left side in every browser. then 2 display inlined elements should be worked same lik

8条回答
  •  温柔的废话
    2020-12-01 05:20

    I always remember what floating is by remembering the original which acts very similar to float:left. Basically float, floats the image to the left and wraps the text or other content around it. Without float it would display as a piece of text.

    Float works similar to other document tools where you can have the text wrap around the image (or HTML element).

提交回复
热议问题