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>
      <div class = "media">
         <a class = "pull-left" href = "#">
            <img class = "media-object" src = "https://tutorialspoint.tw/sql/images/sql-mini-logo.jpg" alt = "SQL">
         </a>
         <div class = "media-body">
            <h4 class = "media-heading">Media heading</h4>
            This is some sample text. This is some sample text.
            This is some sample text. This is some sample text.
            This is some sample text. This is some sample text.
            This is some sample text. This is some sample text.
         </div>
      </div>
      <div class = "media">
         <a class = "pull-left" href = "#">
            <img class = "media-object" src = "https://tutorialspoint.tw/sql/images/sql-mini-logo.jpg" alt = "SQL">
         </a>
         <div class = "media-body">
            <h4 class = "media-heading">Media heading</h4>
            This is some sample text. This is some sample text.
            This is some sample text. This is some sample text.
            This is some sample text. This is some sample text.
            This is some sample text. This is some sample text.
            <div class = "media">
               <a class = "pull-left" href = "#">
                  <img class = "media-object" src = "https://tutorialspoint.tw/sql/images/sql-mini-logo.jpg" alt = "SQL">
               </a>
               <div class = "media-body">
                  <h4 class = "media-heading">Media heading</h4>
                  This is some sample text. This is some sample text.
                  This is some sample text. This is some sample text.
                  This is some sample text. This is some sample text.
                  This is some sample text. This is some sample text.
               </div>
            </div>
         </div>
      </div>
   </body>
</html>

更新於:2020 年 6 月 12 日

81 次瀏覽

開啟您的職業生涯

完成課程即可獲得認證

開始學習
廣告
© . All rights reserved.