MGMtips > カード > カード その他

カード その他

2021-07-01

参考サイト1:https://webst8.com/blog/bootstrap4-card/

参考サイト2:https://webnetamemo.com/coding/bootstrap4/201711116162

参考サイト3:http://www.tohoho-web.com/bootstrap/card.html

参考サイト4:https://getbootstrap.jp/docs/4.2/components/card/

参考サイト5:https://www.webdesignleaves.com/pr/plugins/bootstrap4_04.html

 

cardコンテンツのみ

card-body

 

cardタイトル・サブタイ・テキスト・リンク

.card-title

.card-subtitle..mb-2(margin-bottom0.5rem).text-muted(文字色変更)

.card-text

.card-link
.card-linkと同階層にあると左に間隔

 

cardにヘッダーとフッターを追加

ヘッダーのみが今まで使っていたパネルに一番近いと思います。
背景色変更のクラスを入れた場合、ヘッダーフッターも合わせて背景色変更されます。
WordPressが勝手にpタグをいれてしまうとフッターの下に隙間ができるかもしれないです。

card-header
背景色変更と文字色変更

ヘッダーのみ
card-body

card-body

 

cardリスト付き

  • list-group-item
  • list-group-item
  • list-group-item