Bootstrap 3 responsive columns of varying heights

前端 未结 4 2064
余生分开走
余生分开走 2021-01-14 05:40

EDIT The pricing tables\' content will all be dynamically generated, I cannot predict their height, I\'m simply using the 400px case for th

4条回答
  •  半阙折子戏
    2021-01-14 06:14

    Another way is to use CSS column-width like this..

    .row {
     -moz-column-width: 20em;
     -webkit-column-width: 20em;
     -moz-column-gap: 10px;
     -webkit-column-gap:10px; 
    }
    
    .row > .col-lg-3 {
     display: inline-block;
     padding: 0;
     margin: 10px;
     width: 100%; 
     float:none;
    }
    

    Demo: http://bootply.com/jFdfbBgkv6

提交回复
热议问题