在縮圖類中新增標題文字


若要縮圖類中新增標題文字,請將帶有 .thumbnail 類名的 .caption 類與 Bootstrap 中的 .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-Jun-2020

357 瀏覽量

開啟您的 職業

完成課程後獲得認證

開始
廣告