bootstrap栅格系统作品
时间: 2023-12-16 08:02:55 浏览: 97
bootstrap栅格系统
5星 · 资源好评率100%
以下是一个使用Bootstrap栅格系统布局的网页作品示例:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bootstrap Grid System Example</title>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 1</h5>
<p class="card-text">This is a sample card.</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 2</h5>
<p class="card-text">This is a sample card.</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 3</h5>
<p class="card-text">This is a sample card.</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card 4</h5>
<p class="card-text">This is a sample card.</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
```
这个网页使用了Bootstrap的栅格系统布局,将页面分为4列,每列包含一个卡片。在不同的屏幕尺寸下,根据栅格系统的规则,卡片的大小和排列方式会自动调整。
阅读全文