How to stack divs from top to bottom in CSS

前端 未结 3 1035
感动是毒
感动是毒 2020-12-01 21:28

I have a list that goes like this:

1
2
3
&l
相关标签:
3条回答
  • 2020-12-01 22:01

    Most likely you need to create two div containers for this to work. One container which holds 1-3 and one for 4-5.

    0 讨论(0)
  • 2020-12-01 22:12

    @ funky; you can use css3 column-count property for this

    css:

    div#multicolumn1 {
            -moz-column-count: 2;
            -moz-column-gap: 50%;
            -webkit-column-count: 2;
            -webkit-column-gap: 50%;
            column-count: 3;
            column-gap: 50%;
    
    }
    

    check this link for a demo Div's in two columns

    http://jsfiddle.net/sandeep/pMbtk/

    note: it doesn't work in IE.

    0 讨论(0)
  • 2020-12-01 22:18

    If you don't have to support ie, there are css columns that would do extactly that.

    0 讨论(0)
提交回复
热议问题