Difference Between 'display: block; float: left' vs. 'display: inline-block; float: left'?

后端 未结 3 599
忘了有多久
忘了有多久 2020-12-08 16:45

Is there a practical difference between whether a left-floated element (say, and image) has display: inline-block; applied to it, as opposed to leaving the default display:

3条回答
  •  再見小時候
    2020-12-08 17:17

    When you use float: left; almost any elements behave as a block element. So there is no any difference in this particular case.

    enter image description here

提交回复
热议问题