How to wrap lines in an inline-block with CSS?

前端 未结 4 1863
夕颜
夕颜 2021-02-04 00:33

I have a simple HTML structure (jsfiddle):

  • 4条回答
    •  夕颜
      夕颜 (楼主)
      2021-02-04 01:08

      The exact result you desire can be achieved if you use floats instead of display: inline-block.

      See: http://jsfiddle.net/thirtydot/CatuS/

      li {
          overflow: hidden;
      }
      .buttons, .owners {
          float: left;
      }
      .text {
          overflow: hidden;
          padding-left: 4px;
      }
      

    提交回复
    热议问题