這篇文章將為大家詳細講解有關bootstrap的縮略圖能否設置大小,文章內容質量較高,因此小編分享給大家做個參考,希望大家閱讀完這篇文章后對相關知識有一定的了解。
堅守“ 做人真誠 · 做事靠譜 · 口碑至上 · 高效敬業 ”的價值觀,專業網站建設服務10余年為成都砂巖浮雕小微創業公司專業提供成都定制網頁設計營銷網站建設商城網站建設手機網站建設小程序網站建設網站改版,從內容策劃、視覺設計、底層架構、網頁布局、功能開發迭代于一體的高端網站建設服務。Bootstrap 創建縮略圖的步驟如下:
1、在圖像周圍添加帶有 class .thumbnail 的 <a> 標簽.
2、這會添加四個像素的內邊距(padding)和一個灰色的邊框。
有了一個基本的縮略圖,我們可以向縮略圖添加各種 HTML 內容,比如標題、段落或按鈕。
具體步驟如下:
1、把帶有 class .thumbnail 的 <a> 標簽改為 <div>。
2、在該 <div> 內,您可以添加任何您想要添加的東西。由于這是一個 <div>,我們可以使用默認的基于 span 的命名規則來調整大小。
<!DOCTYPE html> <html> <head> <title>Bootstrap 頁面標題(Page Header)</title> <meta charset="utf-8"> <link rel="stylesheet" href="css/bootstrap.min.css" rel="external nofollow" > <style> h3{ color: #080808; font-weight:900; text-shadow:1px 1px 0px #AD55C9; } p{ color: #6A031A; size: 24px; } </style> </head> <body> <div class="row"> <div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div> <div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div> <div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div> <div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div> <div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div><div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div><div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div><div class="col-sm-6 col-md-3"> <div class="thumbnail"><img src="img/2.jpg"></div> <div class="caption"> <h3>漂亮的圖片</h3> <p>漂亮的圖片.漂亮的圖片.</p> <p><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-primary" role="button">點你 </a> <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="btn btn-default" role="button">就點你 </a> </p> </div> </div> </div> <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> </body> </html>
效果圖:
關于bootstrap的縮略圖能否設置大小就分享到這里了,希望以上內容可以對大家有一定的幫助,可以學到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。
網站欄目:bootstrap的縮略圖能否設置大小-創新互聯
當前鏈接:http://m.newbst.com/article14/dgjede.html
成都網站建設公司_創新互聯,為您提供外貿建站、服務器托管、標簽優化、網站制作、網站導航、動態網站
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯