Multi-column CSS lists

前端 未结 5 1514
抹茶落季
抹茶落季 2020-12-19 06:26

Is there a way to do re-flowable, multi-column lists, where the list can have list items of varying heights, using only valid CSS? By re-fl

5条回答
  •  一向
    一向 (楼主)
    2020-12-19 07:04

    I recently had the need to use multi-column lists in a project. We're using CSS3 columns and ran into several little gotchas along the way. I posted a write-up about it here: http://bit.ly/css3lists

    The short of it is this:

    1. Only set the number of columns and the width between, not the column widths.
    2. If you don't want content to break over multiple columns, you'll need to add some extra markup to make the lists render correctly.

提交回复
热议问题