Bootstrap -- 缩略图、进度条、列表组、面板

1. 缩略图

   大多数站点都需要在网格中布局图像、视频、文本等。Bootstrap 通过缩略图为此提供了一种简便的方式。使用 Bootstrap 创建缩略图的步骤如下:
    (1) 在图像周围添加带有 class .thumbnail 的 <a> 标签。
    (2) 这会添加四个像素的内边距(padding)和一个灰色的边框。
    (3) 当鼠标悬停在图像上时,会动画显示出图像的轮廓

使用缩略图:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>My Test bootstrap</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>            
    <div class="col-md-3">
        <div class="thumbnail">
            <img src="./img/test.jpg"  alt="测试图片1">
            <div class="caption">
                <h3>测试图片1</h3>
                <p>Windows10屏幕截图1</p>
                <p>
                    <a href="#" class="btn btn-primary" role="button">
                        按钮1
                    </a> 
                    <a href="#" class="btn btn-default" role="button">
                        按钮2
                    </a>
                </p>
            </div>
        </div>
    </div>
    <div class="col-md-3">
        <div class="thumbnail">
            <img src="./img/test.jpg"  alt="测试图片2">
            <div class="caption">
                <h3>测试图片2</h3>
                <p>Windows10屏幕截图2</p>
                <p>
                    <a href="#" class="btn btn-primary" role="button">
                        按钮1
                    </a> 
                    <a href="#" class="btn btn-default" role="button">
                        按钮2
                    </a>
                </p>
            </div>
        </div>
    </div>
</body>
</html>
View Code

相关文章:

  • 2021-06-20
  • 2021-11-26
  • 2021-05-26
  • 2021-10-27
  • 2021-10-18
  • 2021-07-07
猜你喜欢
  • 2021-10-16
  • 2021-09-28
  • 2021-12-18
  • 2022-12-23
  • 2021-12-18
  • 2021-06-14
  • 2022-12-23
相关资源
相似解决方案