在縮圖類中新增一個標題文字


要在縮圖類中新增一個標題文字,在 Bootstrap 中,將 .caption 類與 .thumbnail 類一起使用。

.thumbnail 類用於向影像新增縮圖−

示例

真實演示

<!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 = "container">
         <div class = "row">
            <div class = "col-md-4">
               <div class = "thumbnail">
                  <a href = "https://tutorialspoint.tw/python/images/python-data-science-mini-logo.jpg" target = "_blank">
                     <img src = "https://tutorialspoint.tw/python/images/python-data-science-mini-logo.jpg" alt = "Lights" style = "width:100%">
                     <div class="caption">
                        <p>Data science is the process of deriving knowledge and insights from a huge and diverse set of data through organizing, processing and analysing the data. </p>
                     </div>
                  </a>
               </div>
            </div>
         </div>
      </div>
   </body>
</html>

更新於: 12-06-2020

357 次瀏覽

開啟您的 事業

透過完成課程獲得認證

開始學習
廣告