height when containing floating

后端 未结 4 1143
太阳男子
太阳男子 2020-12-23 20:58

I have a list:

  • Number 1
  • Number 2
  • Number 3
  • ...

All

4条回答
  •  醉话见心
    2020-12-23 21:15

    Here, i am presenting, one of the easiest way to handle this kind of situations.

    Float left always have some reaction and not good to use if we have some alternative of it.

    The Alternative is :

    li { display:inline-block; }
    

    No need to add extra code like float:left and overflow:hidden :)

提交回复
热议问题