写一个bootsrap使用的实例
时间: 2023-08-22 12:07:15 浏览: 37
好的,以下是一个 Bootstrap 使用的实例:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bootstrap Example</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1>Bootstrap Example</h1>
<p>This is a simple Bootstrap example.</p>
<button type="button" class="btn btn-primary">Primary Button</button>
<button type="button" class="btn btn-secondary">Secondary Button</button>
</div>
<!-- Bootstrap JS -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
```
这个实例展示了一个简单的页面,包含了一个容器、一个标题、一段文本和两个按钮。其中,使用了 Bootstrap 的 CSS 和 JS 文件,以及 Bootstrap 提供的样式类。通过这些样式类,我们可以很方便地实现各种效果,如按钮样式、表格样式、响应式布局等。