在缩略图类中添加标题文本
bootstrapweb developmentcss framework
要在缩略图类中添加标题文本,请在 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://www.cainiaomax.com/python/images/python-data-science-mini-logo.jpg" target = "_blank"> <img src = "https://www.cainiaomax.com/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>

