使用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 简短祝福语中考女孩的话