カード レイアウト
参考サイト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
カードグループ
複数のカードを横に並べたカードグループを表示します。
任意の位置でカラム落ちさせるのは、標準のクラスでは難しいようです。
rowなどを使った方が良い場合もあると思います。
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
Card title
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
Last updated 3 mins ago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<div class="card-group"> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> </div> |
カードデッキ
複数のカードを横に隙間を開けて並べたカードデッキを表示します。
任意の位置でカラム落ちさせるのは、標準のクラスでは難しいようです。
rowなどを使った方が良い場合もあると思います。
Card title
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Last updated 3 mins ago
Card title
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
Card title
This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
Last updated 3 mins ago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<div class="card-deck"> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This card has supporting text below as a natural lead-in to additional content.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title</h4> <p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> </div> |
カードカラム
カードをカラム表示します。
カラム数は画面の幅によって適度に変化しますが、CSS の columns を指定することにより変更可能です。bootstrap4の該当するクラスを編集する必要があるようです。
Card title 1
text Sample text Sample text Sample text Sample
Card 2 text Sample text Sample text Sample text Sample
Card title 3
text Sample text Sample text Sample text Sample
Last updated 3 mins ago
Card 4 text Sample text Sample text Sample text Sample
Card title 5
text Sample text Sample text Sample text Sample
Last updated 3 mins ago
Card 6 text Sample text Sample text Sample text Sample
Card title 7
text Sample text Sample text Sample text Sample
Last updated 3 mins ago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
<div class="card-columns"> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title 1</h4> <p class="card-text">text Sample text Sample text Sample text Sample</p> </div> </div> <div class="card p-3"> <blockquote class="blockquote mb-0 card-body"> <p>Card 2 text Sample text Sample text Sample text Sample</p> <footer class="blockquote-footer"> <small class="text-muted"> Someone famous in <cite title="Source Title">Source Title</cite> </small> </footer> </blockquote> </div> <div class="card"> <img class="card-img-top" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image cap"> <div class="card-body"> <h4 class="card-title">Card title 3</h4> <p class="card-text">text Sample text Sample text Sample text Sample</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card bg-primary text-white text-center p-3"> <blockquote class="blockquote mb-0"> <p>Card 4 text Sample text Sample text Sample text Sample</p> <footer class="blockquote-footer"> <small> Someone famous in <cite title="Source Title">Source Title</cite> </small> </footer> </blockquote> </div> <div class="card text-center"> <div class="card-body"> <h4 class="card-title">Card title 5</h4> <p class="card-text">text Sample text Sample text Sample text Sample</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> <div class="card"> <img class="card-img" src="http://mgm.moo.jp/cms010/wp-content/uploads/2021/06/bg_scl01.jpg" alt="Card image"> </div> <div class="card p-3 text-right"> <blockquote class="blockquote mb-0"> <p>Card 6 text Sample text Sample text Sample text Sample</p> <footer class="blockquote-footer"> <small class="text-muted"> Someone famous in <cite title="Source Title">Source Title</cite> </small> </footer> </blockquote> </div> <div class="card"> <div class="card-body"> <h4 class="card-title">Card title 7</h4> <p class="card-text">text Sample text Sample text Sample text Sample</p> <p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p> </div> </div> </div> |