bootstrap的缩略图大小能设置么

爱喝马黛茶的安东尼
Lepaskan: 2019-07-25 11:29:55
asal
3458 orang telah melayarinya

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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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="img/2.jpg"></div> 
  <div class="caption"> 
   <h2>漂亮的图片</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>
Salin selepas log masuk

效果图:

z.jpg

Atas ialah kandungan terperinci bootstrap的缩略图大小能设置么. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Artikel terbaru oleh pengarang
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan