使用Bootstrap为图像添加样式
Bootstrap提供了以下类来为图像添加样式:
.img-rounded-添加border-radius:6px 以使图像具有圆角。
.img-circle- 通过添加border-radius:500px使整个图像变圆。
.img-缩略图-添加一些填充和灰色边框
您可以尝试运行以下代码以向图像添加样式
示例
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Images</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/scripts/jquery.min.js"></script>
<script src = "/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<p>Styling images with Bootstrap</p>
<img src = "/bootstrap/images/download.png" class = "img-rounded">
<img src = "/bootstrap/images/download.png" class = "img-circle">
<img src = "/bootstrap/images/download.png" class = "img-thumbnail">
</body>
</html>热门推荐
10 钢琴人祝福语女生简短
11 岗位考试顺利祝福语简短
12 关于老师蛋糕祝福语简短
13 娘家妈妈新婚祝福语简短
14 生日留言简短祝福语大全
15 祝福语诗意文案简短
16 校长退休文案祝福语简短
17 宝子生日祝福语简短
18 寒露祝福语毕业寄语简短