用包含Bootstrap+CSS3+JavaScript来编写一个实例网站
时间: 2023-08-11 08:06:10 浏览: 139
好的,我可以给您提供一个包含Bootstrap+CSS3+JavaScript的示例网站。这是一个简单的响应式网站,适用于桌面和移动设备。
```html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap CSS3 JavaScript Website</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container">
<a class="navbar-brand" href="#">Bootstrap CSS3 JS</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Jumbotron -->
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1 class="display-4">Bootstrap CSS3 JavaScript Website</h1>
<p class="lead">This is a simple example website that demonstrates how to use Bootstrap, CSS3, and JavaScript to create a modern website.</p>
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
</div>
</div>
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-md-8">
<h2>Section Heading</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sagittis tincidunt nunc, ac tincidunt felis laoreet a. Proin volutpat tincidunt risus, ac bibendum lorem commodo vitae. Sed id ex non purus eleifend hendrerit. Donec blandit, est vel gravida semper, dolor magna venenatis enim, vel dictum nisl sapien in dolor. Integer pharetra augue nec nulla bibendum, eget vulputate metus pellentesque. Sed aliquet massa quis leo auctor facilisis. Pellentesque scelerisque lorem vel lorem sagittis, a faucibus eros pretium. Aliquam quis nulla ut dolor malesuada egestas. Nunc pretium, nisi vitae condimentum volutpat, ex tellus pharetra massa, vel molestie tellus elit euismod sapien. Nullam nec enim euismod, luctus nisi eu, venenatis velit.</p>
<p>Etiam nec nulla sit amet orci malesuada malesuada. Ut mollis mi sed lacus semper, eu maximus purus venenatis. Aenean quis enim vel lectus bibendum viverra. Sed tristique, nulla vitae aliquam ullamcorper, eros velit faucibus velit, in maximus nunc tellus eu nunc. Sed hendrerit leo ut risus facilisis, ut convallis magna iaculis. Quisque vel dolor non massa pharetra bibendum. Nulla facilisi. Etiam lacinia nunc eu nibh efficitur, euismod euismod felis aliquet. Fusce bibendum vehicula velit, sed egestas ex laoreet sed. Praesent vitae mauris est. Proin bibendum urna vitae mi bibendum congue. Sed hendrerit ante in eros malesuada, a pulvinar sapien vestibulum. Nullam a velit quis enim viverra suscipit.</p>
</div>
<div class="col-md-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">Card Title</h5>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sagittis tincidunt nunc, ac tincidunt felis laoreet a. Proin volutpat tincidunt risus, ac bibendum lorem commodo vitae.</p>
<a href="#" class="btn btn-primary">Read More</a>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-dark text-white">
<div class="container py-5">
<div class="row">
<div class="col-md-6">
<p>Bootstrap CSS3 JavaScript Website © 2021</p>
</div>
<div class="col-md-6">
<ul class="list-unstyled">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
</div>
</footer>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js"></script>
</body>
</html>
```
这个示例网站包含了一个响应式导航栏、一个Jumbotron、一个主要内容区域和一个页脚。它还使用了Bootstrap的网格系统,以便在不同屏幕大小上正确布局内容。
希望这个示例网站能够帮助您了解如何使用Bootstrap、CSS3和JavaScript来编写一个现代化的网站。如果您有任何问题或需要更多帮助,请随时告诉我。
阅读全文