1. 程式人生 > >Bootstrap列表list-group-item與card 卡片

Bootstrap列表list-group-item與card 卡片

典型的例子:<div class="container">
bootstrap中container垂直居中
  <h2>圖片卡片</h2>
  <p>圖片在頭部 (card-img-top):</p>
  <div class="card" style="width:400px">
  定義卡片card
    <img class="card-img-top" src="http://static.runoob.com/images/mix/img_avatar.png" alt="Card image" style="width:100%">
  定義卡片圖片在文字上方card-img-top
    <div class="card-body">
  定義卡片中的內容  card-body
      <h4 class="card-title">John Doe</h4>
定義設定卡片的標題   card-title
      <p class="card-text">Some example text some example text. John Doe is an architect and engineer</p>
定義用於設定卡片正文的內容  card-text
      <a href="#" class="btn btn-primary">See Profile</a>
定義設定卡片的連結btn btn priamry
    </div>
  </div>
  <br>
  
  <p>圖片在底部(card-img-bottom):</p>
  <div class="card" style="width:400px">
    <div class="card-body">
      <h4 class="card-title">Jane Doe</h4>
      <p class="card-text">Some example text some example text. Jane Doe is an architect and engineer</p>
      <a href="#" class="btn btn-primary">See Profile</a>
    </div>
    <img class="card-img-bottom" src="http://static.runoob.com/images/mix/img_avatar.png" alt="Card image" style="width:100%">
  </div>