Bootstrap的图像和图标

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chengqiuming/article/details/86565403

一 图像

1 代码

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图像</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.1.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-sm-4">
            <img alt="140x140" src="http://placehold.it/140x140">
            <div>默认图片</div>
        </div>
        <div class="col-sm-4">
            <img class="img-rounded" alt="140x140" src="http://placehold.it/140x140">
            <div>圆角图片</div>
        </div>
        <div class="col-sm-4">
            <img class="img-circle" alt="140x140" src="http://placehold.it/140x140">
            <div>圆形图片</div>
        </div>
        <div class="row">
            <div class="col-sm-6">
                <img class="img-thumbnail" alt="140x140" src="http://placehold.it/140x140">
                <div>缩略图</div>
            </div>
            <div class="col-sm-6">
                <img class="img-responsive" alt="140x140" src="http://placehold.it/140x140"/>
                <div>响应式图片</div>
            </div>
        </div>
    </div>
</div>
</body>
</html>

2 效果

二 图标

1 说明

可以到https://getbootstrap.com/docs/3.3/components/

去查找各类图标。

2 代码

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
   <title>图标</title>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.1.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
   <span class="glyphicon glyphicon-search"></span>
   <span class="glyphicon glyphicon-asterisk"></span>
   <span class="glyphicon glyphicon-plus"></span>
   <span class="glyphicon glyphicon-cloud"></span>
    </body>
</html>

2 效果

猜你喜欢

转载自blog.csdn.net/chengqiuming/article/details/86565403