CSS: Floating multiple elements with different heights on multiple rows?

后端 未结 6 1219
既然无缘
既然无缘 2020-12-18 23:13

I\'m trying to organize divs into two columns, but not force them into rows. I\'m also trying to keep the vertical spacing between the divs a const

6条回答
  •  温柔的废话
    2020-12-18 23:53

    Thanks to J.Albert Bowden for the fiddle

    HTML

    CSS

    #box{
        -moz-column-count:3;
        -moz-column-gap: 3%;
        -moz-column-width: 30%;
        -webkit-column-count:3;
        -webkit-column-gap: 3%;
        -webkit-column-width: 30%;
        column-count: 3;
        column-gap: 3%;
        column-width: 30%;
    }
    .module{
        margin-bottom: 20px;
    }
    

提交回复
热议问题