Bootstrap 4 card deck table-cell columns responsive based on viewport?

前端 未结 6 1744
予麋鹿
予麋鹿 2021-02-02 16:34

So in Bootstrap v4, I see there\'s a new feature for card decks ( http://v4-alpha.getbootstrap.com/components/card/#decks ) that makes a group of cards, with their height equal

6条回答
  •  余生分开走
    2021-02-02 17:13

    Here you go, http://codepen.io/KarlDoyle/pen/pypWbR

    The main thing is that you have to override the styles. as shown below.

    .card-deck {
      display: flex;
      justify-content: flex-start;
      flex-flow: row wrap; 
      align-items: stretch;
    }
    .card-deck .card {
      display: block;
      flex-basis: 33.3%; /* change this value for each breakpoint*/
    }
    

提交回复
热议问题