搜尋
首頁web前端Bootstrap教程bootstrap的縮圖大小能設定麼

bootstrap的縮圖大小能設定麼

Jul 13, 2019 pm 02:00 PM
bootstrap縮圖設定

bootstrap的縮圖大小能設定麼

Bootstrap 建立縮圖的步驟如下:

1、在圖片周圍加入有class .thumbnail 的2、這會加入四個像素的內邊距(padding)和一個灰色的邊框。

有了一個基本的縮圖,我們可以在縮圖中新增各種 HTML 內容,例如標題、段落或按鈕。

具體步驟如下:
1、把有  class .thumbnail 的 標籤改為


2、在該
內,您可以新增任何您想要新增的東西。由於這是一個
,我們可以使用預設的基於 span 的命名規則來調整大小。

相關推薦:《bootstrap入門教學

<!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> 
  h2{ 
  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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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="/static/imghwm/default1.png"  data-src="img/2.jpg"  class="lazy"   alt="bootstrap的縮圖大小能設定麼" ></div> 
  <div class="caption"> 
   <h2 id="漂亮的图片">漂亮的图片</h2> 
   <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的縮圖大小能設定麼的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
引導程序:從佈局到組件引導程序:從佈局到組件Apr 23, 2025 am 12:06 AM

Bootstrap是一個由Twitter開發的前端框架,集成了HTML、CSS和JavaScript,幫助開發者快速構建響應式網站。其核心功能包括:柵格系統與佈局:基於12列的設計,使用flexbox佈局,支持不同設備尺寸的響應式頁面。組件與樣式:提供豐富的組件庫,如按鈕、模態框等,通過添加類名即可實現美觀效果。工作原理:依賴CSS和JavaScript,CSS使用LESS或SASS預處理器,JavaScript依賴jQuery,實現交互和動態效果。通過這些功能,Bootstrap大大提升了開發

什麼是bootstrap?初學者的介紹什麼是bootstrap?初學者的介紹Apr 22, 2025 am 12:07 AM

BootstrapisafreeCSSframeworkthatsimplifieswebdevelopmentbyprovidingpre-styledcomponentsandJavaScriptplugins.It'sidealforcreatingresponsive,mobile-firstwebsites,offeringaflexiblegridsystemforlayoutsandasupportivecommunityforlearningandcustomization.

Bootstrap Demystified:一個簡單的解釋Bootstrap Demystified:一個簡單的解釋Apr 21, 2025 am 12:13 AM

Bootstrapisafree,open-sourceCSSframeworkthathelpscreateresponsive,mobile-firstwebsites.1)Itoffersagridsystemforlayoutflexibility,2)includespre-styledcomponentsforquickdesign,and3)ishighlycustomizabletoavoidgenericlooks,butrequiresunderstandingCSStoop

引導與反應:選擇正確的方法引導與反應:選擇正確的方法Apr 20, 2025 am 12:09 AM

Bootstrap適合快速搭建和小型項目,而React適合複雜的、交互性強的應用。 1)Bootstrap提供預定義的CSS和JavaScript組件,簡化響應式界面開發。 2)React通過組件化開發和虛擬DOM,提升性能和交互性。

Bootstrap的目的:建立一致且有吸引力的網站Bootstrap的目的:建立一致且有吸引力的網站Apr 19, 2025 am 12:07 AM

Bootstrap的主要用途是幫助開發者快速構建響應式、移動優先的網站。其核心功能包括:1.響應式設計,通過網格系統實現不同設備的佈局調整;2.預定義組件,如導航欄和模態框,確保美觀和跨瀏覽器兼容性;3.支持自定義和擴展,使用Sass變量和mixins調整樣式。

Bootstrap與其他框架:比較概述Bootstrap與其他框架:比較概述Apr 18, 2025 am 12:06 AM

Bootstrap優於TailwindCSS、Foundation和Bulma,因為它易用且快速開發響應式網站。 1.Bootstrap提供豐富的預定義樣式和組件庫。 2.其CSS和JavaScript庫支持響應式設計和交互功能。 3.適合快速開發,但自定義樣式可能較複雜。

在React中集成引導樣式:方法和技術在React中集成引導樣式:方法和技術Apr 17, 2025 am 12:04 AM

在React項目中整合Bootstrap可以通過兩種方法:1)使用CDN引入,適合小型項目或快速原型設計;2)使用npm包管理器安裝,適用於需要深度定制的場景。通過這些方法,你可以在React中快速構建美觀且響應式的用戶界面。

React的引導:優勢和最佳實踐React的引導:優勢和最佳實踐Apr 16, 2025 am 12:17 AM

將Bootstrap集成到React項目中的優勢包括:1)快速開發,2)一致性和可維護性,3)響應式設計。通過直接引入CSS文件或使用React-Bootstrap庫,可以在React項目中高效使用Bootstrap的組件和样式。

See all articles

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱工具

SublimeText3 Linux新版

SublimeText3 Linux新版

SublimeText3 Linux最新版

Atom編輯器mac版下載

Atom編輯器mac版下載

最受歡迎的的開源編輯器

SecLists

SecLists

SecLists是最終安全測試人員的伙伴。它是一個包含各種類型清單的集合,這些清單在安全評估過程中經常使用,而且都在一個地方。 SecLists透過方便地提供安全測試人員可能需要的所有列表,幫助提高安全測試的效率和生產力。清單類型包括使用者名稱、密碼、URL、模糊測試有效載荷、敏感資料模式、Web shell等等。測試人員只需將此儲存庫拉到新的測試機上,他就可以存取所需的每種類型的清單。

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)