好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Bootstrap缩略图的详细介绍

本章将讲解 Bootstrap 缩略图。大 多数站点都需要在网格中布局图像、视频、文本等。Bootstrap 通过缩略图为此提供了一种简便的方式。使用 Bootstrap 创建缩略图的步骤如下:

在图像周围添加带有 class .thumbnail 的 <a> 标签。

这会添加四个像素的内边距(padding)和一个灰色的边框。

当鼠标悬停在图像上时,会动画显示出图像的轮廓。

概述

  Boostrap 缩略图的默认设计仅需最少的标签就能展示带链接的图片,通过“thumbnail”样式配合bootstrap的网格系统来实现缩略图

  thumbnail中文翻译是拇指指甲,确实有些像缩略图,中间是图片,图片周围是一小圈空白,外面是边框和圆角,下面是文字

.thumbnail {
  display: block;
  padding: 4px;
  margin-bottom: 20px;
  line-height: 1.42857143;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  -webkit-transition: all .2s ease-in-out;  transition: all .2s ease-in-out;
}.thumbnail > img,
.thumbnail a > img {
  margin-right: auto;
  margin-left: auto;
}a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
  border-color: #428bca;
}.thumbnail .caption {
  padding: 9px;
  color: #333;
} 

查看更多关于Bootstrap缩略图的详细介绍的详细内容...

  阅读:52次