案例
① 轮播图
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 支持手机端 -->
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 实现首页的导航以及搜索栏目 -->
<title>Demo1轮播图</title>
<!-- link引入Bootstrap.css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<!-- 导入jQuery类 -->
<script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
<!-- 导入Bootstrap.js -->
<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<style>
.navbar-collapse {
/* 布局*/
flex-grow: 0;
}
.form-group {
/* 宽度*/
width: 320px;
/* 居中*/
margin: 0 auto;
}
</style>
<script>
//轮播图自动播放
$(function() {
$('.carousel').carousel({
interval: 3000;
});
});
</script>
</head>
<body>
<!-- 实现网站首页的导航条 -->
<!-- Bootstrap 导航条 通过nav标签添加navbar导航条样式 -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<!-- 导航条的标题 -->
<a class="navbar-brand" href="#">您好!欢迎来到德莱联盟</a>
<!-- 按钮 -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- collapse 折叠组件-->
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link active" href="#">首页 <span class="sr-only">(current)</span></a>
<a class="nav-link" href="Demo5登录+注册.html">登录</a>
<a class="nav-link" href="Demo5登录+注册.html">注册</a>
<!-- disabled 禁用-->
<a class="nav-link disabled">我的购物车</a>
</div>
</div>
</div>
</nav>
<!-- 除去导航条 都需要借助栅格系统来实现 -->
<div class="container">
<!-- 第一行 显示搜索栏目 -->
<div class="row" style="margin-top: 10px;">
<!-- 栅格系统的列 col-->
<div class="col">
<div class="jumbotron">
<!-- 表单模块-->
<form>
<div class="form-group">
<!-- 输入框组件-->
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="名称"
aria-label="Recipient's username" aria-describedby="button-addon2">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button"
id="button-addon2">搜索</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- 第二行 显示左侧列表以及右侧的轮播图以及热门书籍 -->
<div class="row">
<div class="col-12 col-md-3" style="background-color: #F5C6CB;">
左侧分类列表显示
</div>
<div class="col-12 col-md-9" style="background-color: #ED969E;">
<div class="row">
<div class="col-12" style="background-color: #8FD19E;">
<!-- 轮播图 -->
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/lb1.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb2.jpg" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb3.jpg" class="d-block w-100" alt="...">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button"
data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button"
data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-12" style="background-color: cadetblue;">新书上架+热门书籍</div>
</div>
</div>
</div>
</div>
</body>
</html>
② 列表组实现分类
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 支持手机端 -->
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 实现首页的导航以及搜索栏目 -->
<title>Demo2列表组实现分类</title>
<!-- link引入Bootstrap.css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<!-- 导入jQuery类 -->
<script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
<!-- 导入Bootstrap.js -->
<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<style>
.navbar-collapse {
/* 布局*/
flex-grow: 0;
}
.form-group {
/* 宽度*/
width: 320px;
/* 居中*/
margin: 0 auto;
}
.book_type {
border: 1px solid brown;
height: 50px;
text-align: center;
line-height: 50px;
font-weight: bold;
font-size: 20px;
background-color: #710503;
color: white;
}
</style>
<script>
//轮播图自动播放
$(function() {
$('.carousel').carousel({
interval: 3000;
});
});
</script>
</head>
<body>
<!-- 实现网站首页的导航条 -->
<!-- Bootstrap 导航条 通过nav标签添加navbar导航条样式 -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<!-- 导航条的标题 -->
<a class="navbar-brand" href="#">您好!欢迎来到德莱联盟</a>
<!-- 按钮 -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- collapse 折叠组件-->
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link active" href="#">首页 <span class="sr-only">(current)</span></a>
<a class="nav-link" href="Demo5登录+注册.html">登录</a>
<a class="nav-link" href="Demo5登录+注册.html">注册</a>
<!-- disabled 禁用-->
<a class="nav-link disabled">我的购物车</a>
</div>
</div>
</div>
</nav>
<!-- 除去导航条 都需要借助栅格系统来实现 -->
<div class="container">
<!-- 第一行 显示搜索栏目 -->
<div class="row" style="margin-top: 10px;">
<!-- 栅格系统的列 col-->
<div class="col">
<div class="jumbotron">
<!-- 表单模块-->
<form>
<div class="form-group">
<!-- 输入框组件-->
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="名称"
aria-label="Recipient's username" aria-describedby="button-addon2">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button"
id="button-addon2">搜索</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- 第二行 显示左侧列表以及右侧的轮播图以及热门书籍 -->
<div class="row">
<div class="col-12 col-md-3" style="background-color: #F5C6CB;">
<!-- 左侧分类列表显示 -->
<div class="book_type">书籍分类</div>
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action active">
惊悚
</button>
<button type="button" class="list-group-item list-group-item-action">喜剧</button>
<button type="button" class="list-group-item list-group-item-action">战争</button>
<button type="button" class="list-group-item list-group-item-action">科幻</button>
<button type="button" class="list-group-item list-group-item-action" disabled>魔幻</button>
<button type="button" class="list-group-item list-group-item-action" disabled>爱情</button>
<button type="button" class="list-group-item list-group-item-action" disabled>校园</button>
</div>
</div>
<div class="col-12 col-md-9" style="background-color: #ED969E;">
<div class="row">
<div class="col-12" style="background-color: #8FD19E;">
<!-- 轮播图 -->
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/lb1.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb2.jpg" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb3.jpg" class="d-block w-100" alt="...">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button"
data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button"
data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-12" style="background-color: cadetblue;">新书上架+热门书籍</div>
</div>
</div>
</div>
</div>
</body>
</html>
③ 实现新书上架+热门书籍
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 支持手机端 -->
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 实现首页的导航以及搜索栏目 -->
<title>Demo3实现新书上架+热门书籍</title>
<!-- link引入Bootstrap.css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<!-- 导入jQuery类 -->
<script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
<!-- 导入Bootstrap.js -->
<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<style>
.navbar-collapse {
/* 布局*/
flex-grow: 0;
}
.form-group {
/* 宽度*/
width: 320px;
/* 居中*/
margin: 0 auto;
}
.book_type {
border: 1px solid brown;
height: 50px;
text-align: center;
line-height: 50px;
font-weight: bold;
font-size: 20px;
background-color: #710503;
color: white;
}
</style>
<script>
//轮播图自动播放
$(function() {
$('.carousel').carousel({
interval: 3000;
});
});
</script>
</head>
<body>
<!-- 实现网站首页的导航条 -->
<!-- Bootstrap 导航条 通过nav标签添加navbar导航条样式 -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<!-- 导航条的标题 -->
<a class="navbar-brand" href="#">您好!欢迎来到德莱联盟</a>
<!-- 按钮 -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- collapse 折叠组件-->
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link active" href="#">首页 <span class="sr-only">(current)</span></a>
<a class="nav-link" href="Demo5登录+注册.html">登录</a>
<a class="nav-link" href="Demo5登录+注册.html">注册</a>
<!-- disabled 禁用-->
<a class="nav-link disabled">我的购物车</a>
</div>
</div>
</div>
</nav>
<!-- 除去导航条 都需要借助栅格系统来实现 -->
<div class="container">
<!-- 第一行 显示搜索栏目 -->
<div class="row" style="margin-top: 10px;">
<!-- 栅格系统的列 col-->
<div class="col">
<div class="jumbotron">
<!-- 表单模块-->
<form>
<div class="form-group">
<!-- 输入框组件-->
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="名称"
aria-label="Recipient's username" aria-describedby="button-addon2">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button"
id="button-addon2">搜索</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- 第二行 显示左侧列表以及右侧的轮播图以及热门书籍 -->
<div class="row">
<div class="col-12 col-md-3" style="background-color: #F5C6CB;">
<!-- 左侧分类列表显示 -->
<div class="book_type">书籍分类</div>
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action active">
惊悚
</button>
<button type="button" class="list-group-item list-group-item-action">喜剧</button>
<button type="button" class="list-group-item list-group-item-action">战争</button>
<button type="button" class="list-group-item list-group-item-action">科幻</button>
<button type="button" class="list-group-item list-group-item-action" disabled>魔幻</button>
<button type="button" class="list-group-item list-group-item-action" disabled>爱情</button>
<button type="button" class="list-group-item list-group-item-action" disabled>校园</button>
</div>
</div>
<div class="col-12 col-md-9" style="background-color: #ED969E;">
<div class="row">
<div class="col-12" style="background-color: #8FD19E;">
<!-- 轮播图 -->
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/lb1.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb2.jpg" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb3.jpg" class="d-block w-100" alt="...">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button"
data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button"
data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="row">
<div class="col-md-2 col-sm-3 col-6" style="background-color: cadetblue;">
<!-- 新书上架+热门书籍 -->
<figure class="figure">
<img src="img/1.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/2.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/3.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
</div>
<!-- </div>热门书架 -->
<div class="row">
<div class="col-md-2 col-sm-3 col-6" style="background-color: cadetblue;">
<!-- 新书上架+热门书籍 -->
<figure class="figure">
<img src="img/1.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/2.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/3.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
④ 首页整合
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- 支持手机端 -->
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 实现首页的导航以及搜索栏目 -->
<title>Demo4首页整合</title>
<!-- link引入Bootstrap.css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<!-- 导入jQuery类 -->
<script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
<!-- 导入Bootstrap.js -->
<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<style>
.navbar-collapse {
/* 布局*/
flex-grow: 0;
}
.form-group {
/* 宽度*/
width: 320px;
/* 居中*/
margin: 0 auto;
}
.book_type {
border: 1px solid brown;
height: 50px;
text-align: center;
line-height: 50px;
font-weight: bold;
font-size: 20px;
background-color: #710503;
color: white;
}
#title {
background-image: url(img/title_bj.png);
height: 30px;
margin-top: 20px;
margin-bottom: 10px;
background-repeat: no-repeat;
border: 1px solid gainsboro;
color: white;
font-weight: bold;
padding-left: 15px;
text-align: center;
line-height: 30px;
}
</style>
<script>
//轮播图自动播放
$(function() {
$('.carousel').carousel({
interval: 3000
});
});
</script>
</head>
<body>
<!-- 实现网站首页的导航条 -->
<!-- Bootstrap 导航条 通过nav标签添加navbar导航条样式 -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<!-- 导航条的标题 -->
<a class="navbar-brand" href="#">您好!欢迎来到德莱联盟</a>
<!-- 按钮 -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup"
aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- collapse 折叠组件-->
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-link active" href="#">首页 <span class="sr-only">(current)</span></a>
<a class="nav-link" href="Demo5登录+注册.html">登录</a>
<a class="nav-link" href="Demo5登录+注册.html">注册</a>
<!-- disabled 禁用-->
<a class="nav-link disabled">我的购物车</a>
</div>
</div>
</div>
</nav>
<!-- 除去导航条 都需要借助栅格系统来实现 -->
<div class="container">
<!-- 第一行 显示搜索栏目 -->
<div class="row" style="margin-top: 10px;">
<!-- 栅格系统的列 col-->
<div class="col">
<div class="jumbotron">
<!-- 表单模块-->
<form>
<div class="form-group">
<!-- 输入框组件-->
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="名称"
aria-label="Recipient's username" aria-describedby="button-addon2">
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="button"
id="button-addon2">搜索</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- 第二行 显示左侧列表以及右侧的轮播图以及热门书籍 -->
<div class="row">
<div class="col-12 col-md-3">
<!-- 左侧分类列表显示 -->
<div class="book_type">书籍分类</div>
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action active">
惊悚
</button>
<button type="button" class="list-group-item list-group-item-action">喜剧</button>
<button type="button" class="list-group-item list-group-item-action">战争</button>
<button type="button" class="list-group-item list-group-item-action">科幻</button>
<button type="button" class="list-group-item list-group-item-action">魔幻</button>
<button type="button" class="list-group-item list-group-item-action">爱情</button>
<button type="button" class="list-group-item list-group-item-action">哈哈</button>
<button type="button" class="list-group-item list-group-item-action">呵呵</button>
<button type="button" class="list-group-item list-group-item-action">嘿嘿</button>
<button type="button" class="list-group-item list-group-item-action">嘻嘻</button>
<button type="button" class="list-group-item list-group-item-action">霍霍</button>
</div>
</div>
<div class="col-12 col-md-9">
<div class="row">
<div class="col-12">
<!-- 轮播图 -->
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/lb1.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb2.jpg" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/lb3.jpg" class="d-block w-100" alt="...">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button"
data-slide="prev">
<span class="carousel-control-prev-icon" style="background-color: pink;"
aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button"
data-slide="next">
<span class="carousel-control-next-icon" style="background-color: pink;"
aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<!-- 新书上架标题 -->
<div class="row">
<div class="col">
<div id="title">新书上架</div>
</div>
</div>
<div class="row">
<div class="col-md-2 col-sm-3 col-6">
<!-- 新书上架+热门书籍 -->
<figure class="figure">
<img src="img/1.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/2.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/3.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
</div>
<div class="row">
<div class="col">
<div id="title">热门书架</div>
</div>
</div>
<!-- </div>热门书架 -->
<div class="row">
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/1.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/2.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/3.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
<div class="col-md-2 col-sm-3 col-6">
<figure class="figure">
<img src="img/4.png" class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption" style="color: white;">$23.00</figcaption>
</figure>
</div>
</div>
<!-- 版权信息 -->
<div class="row" style="margin-top: 10px;">
<div class="col">
<div class="text-center">©所有信息归卓京所有</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
⑤ 登录+注册
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Demo5登录+注册</title>
<!-- 支持手机端 -->
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- 实现首页的导航以及搜索栏目 -->
<title>Demo5登录+注册</title>
<!-- link引入Bootstrap.css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<!-- 导入jQuery类 -->
<script type="text/javascript" src="js/jquery-3.6.0.min.js"></script>
<!-- 导入Bootstrap.js -->
<script src="js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<style>
.form-group{
width: 300px;
margin: 0 auto;
}
#myForm{
text-align: center;
margin-top: 170px;
}
</style>
</head>
<body>
<!-- 用户登录+注册 -->
<form id="myForm">
<h2 style="font-weight: bold;">用户登录和注册</h2>
<div class="form-group">
<label for="exampleInputEmail1">用户名</label>
<input type="text" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Username">
<small id="emailHelp" class="form-text text-muted"></small>
</div>
<div class="form-group">
<label for="exampleInputPassword1">密码</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<div class="form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">一周内免登陆</label>
</div>
<button type="submit" class="btn btn-primary" style="width: 300px;">登录|注册</button>
</form>
</body>
</html>