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

后端 未结 6 1236
既然无缘
既然无缘 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条回答
  •  猫巷女王i
    2020-12-18 23:53

    HTML

    CSS:

    #box{
    display:box;
    box-orient: vertical;
    -webkit-display:box; 
    -webkit-box-orient: vertical;
    }
    
    .module{
    box-flex: 1;
    -webkit-box-flex: 1;
    }
    

    This is box-flex, introduced in css3. you may have to use also -webkit-/ -moz- property, before "display", "box orient" and so on, it depends on the browser

提交回复
热议问题