bootstrapを用いて、画像のような表示をしたいです。
A列B列C列、列単位でcardを表示させるようなイメージです。
また、B列のみ1行目は1カラム、2行目は2カラム、3行目は1カラムのような形で交互で表示させたいと考えてます。
B列の1カラムと2カラムの表示がなかなかできず、お手数ではございますが、教えていただけますと大変助かります。
html
1<!-- A列 --> 2<div class="d-flex flex-column"> 3 <div class="card" style="width: 18rem;"> 4 <div class="card-body"> 5 <h5 class="card-title">Special title treatment</h5> 6 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 7 <a href="#" class="btn btn-primary">Go somewhere</a> 8 </div> 9 </div> 10 11 <div class="card text-center" style="width: 18rem;"> 12 <div class="card-body"> 13 <h5 class="card-title">Special title treatment</h5> 14 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 15 <a href="#" class="btn btn-primary">Go somewhere</a> 16 </div> 17 </div> 18 19 <div class="card text-right" style="width: 18rem;"> 20 <div class="card-body"> 21 <h5 class="card-title">Special title treatment</h5> 22 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 23 <a href="#" class="btn btn-primary">Go somewhere</a> 24 </div> 25 </div> 26</div> 27 28<!-- B列 --> 29<div class="d-flex flex-column"> 30 <div class="card" style="width: 18rem;"> 31 <div class="card-body"> 32 <h5 class="card-title">Special title treatment</h5> 33 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 34 <a href="#" class="btn btn-primary">Go somewhere</a> 35 </div> 36 </div> 37 38 <div class="card text-center" style="width: 18rem;"> 39 <div class="card-body"> 40 <h5 class="card-title">Special title treatment</h5> 41 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 42 <a href="#" class="btn btn-primary">Go somewhere</a> 43 </div> 44 </div> 45 46 <div class="card text-right" style="width: 18rem;"> 47 <div class="card-body"> 48 <h5 class="card-title">Special title treatment</h5> 49 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 50 <a href="#" class="btn btn-primary">Go somewhere</a> 51 </div> 52 </div> 53</div> 54 55<!-- C列 --> 56<div class="d-flex flex-column"> 57 <div class="card" style="width: 18rem;"> 58 <div class="card-body"> 59 <h5 class="card-title">Special title treatment</h5> 60 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 61 <a href="#" class="btn btn-primary">Go somewhere</a> 62 </div> 63 </div> 64 65 <div class="card text-center" style="width: 18rem;"> 66 <div class="card-body"> 67 <h5 class="card-title">Special title treatment</h5> 68 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 69 <a href="#" class="btn btn-primary">Go somewhere</a> 70 </div> 71 </div> 72 73 <div class="card text-right" style="width: 18rem;"> 74 <div class="card-body"> 75 <h5 class="card-title">Special title treatment</h5> 76 <p class="card-text">With supporting text below as a natural lead-in to additional content.</p> 77 <a href="#" class="btn btn-primary">Go somewhere</a> 78 </div> 79 </div> 80</div>
回答1件
あなたの回答
tips
プレビュー