建立引導媒體列表


要使用 Bootstrap 在 Bootstrap 中建立一個媒體列表,你可以嘗試執行以下程式碼 −

示例

線上演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <ul class = "media-list">
         <li class = "media">
            <a class = "pull-left" href = "#">
               <img class = "media-object" src = "https://tutorialspoint.tw/latest/Angular-4.png" alt = "Generic placeholder image">
            </a>
            <div class = "media-body">
               <h4 class = "media-heading">Media heading</h4>
               <p>
                  This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
               </p>
               <div class = "media">
                  <a class = "pull-left" href = "#">
                     <img class = "media-object" src = "https://tutorialspoint.tw/latest/Angular-4.png"
                     alt = "Generic placeholder image">
                  </a>
                  <div class = "media-body">
                     <h4 class = "media-heading">Nested heading</h4>
                     This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
                     <div class = "media">
                        <a class = "pull-left" href = "#">
                           <img class = "media-object" src = "https://tutorialspoint.tw/latest/Angular-4.png"
                           alt = "Generic placeholder image">
                        </a>
                        <div class = "media-body">
                           <h4 class = "media-heading">Nested heading</h4>
                           This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
                        </div>
                     </div>
                  </div>
               </div>
               <div class = "media">
                  <a class = "pull-left" href = "#">
                     <img class = "media-object" src = "https://tutorialspoint.tw/latest/Angular-4.png"
                     alt = "Generic placeholder image">
                  </a>
                  <div class = "media-body">
                     <h4 class = "media-heading">Nested heading</h4>
                     This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
                  </div>
               </div>
            </div>
         </li>
      </ul>
   </body>
</html>

更新時間: 2020 年 6 月 12 日

205 次瀏覽

開啟你的職業生涯

完成課程以獲得認證

立即開始
廣告
© . All rights reserved.