Bootstrap 4 - displaying cards in a custom way

前端 未结 2 475
刺人心
刺人心 2021-01-25 06:45

I\'m trying to create a proper semantic HTML/CSS based on Bootstrap 4 that would present card elements in a certain way without adding too much custom bulk.

What I have

2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-25 07:26

    You can use the Bootstrap 4 utility classes to adjust the layout...

    • h-100 to make the left card full-height to match the smaller cards
    • p-2 spacing (padding) to make even gutter between columns

    https://www.codeply.com/go/CPe58ZHi2u

    Test 1

    Test 2

    Test 3

    Test 4

    Test 5

    Test 6

    Test 7

    Also, p-3 could be used instead of p-2 if you want a larger gutter.

提交回复
热议问题