用html帮我写一个后台管理页面
时间: 2023-07-01 19:19:47 浏览: 106
好的,以下是一个简单的后台管理页面的HTML代码,包括了用户管理、权限管理、数据统计和系统配置四个模块,您可以根据需要进行修改和优化。
```html
<!DOCTYPE html>
<html>
<head>
<title>后台管理页面</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
<a class="navbar-brand" href="#">后台管理系统</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#user">用户管理</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#permission">权限管理</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#data">数据统计</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#config">系统配置</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-sm-9">
<h2 id="user">用户管理</h2>
<table class="table table-hover">
<thead>
<tr>
<th>用户名</th>
<th>邮箱</th>
<th>角色</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>张三</td>
<td>zhangsan@example.com</td>
<td>管理员</td>
<td>
<button type="button" class="btn btn-primary">编辑</button>
<button type="button" class="btn btn-danger">删除</button>
</td>
</tr>
<tr>
<td>李四</td>
<td>lisi@example.com</td>
<td>普通用户</td>
<td>
<button type="button" class="btn btn-primary">编辑</button>
<button type="button" class="btn btn-danger">删除</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-9">
<h2 id="permission">权限管理</h2>
<table class="table table-hover">
<thead>
<tr>
<th>权限名称</th>
<th>权限描述</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>用户管理</td>
<td>管理用户的权限</td>
<td>
<button type="button" class="btn btn-primary">编辑</button>
<button type="button" class="btn btn-danger">删除</button>
</td>
</tr>
<tr>
<td>权限管理</td>
<td>管理权限的权限</td>
<td>
<button type="button" class="btn btn-primary">编辑</button>
<button type="button" class="btn btn-danger">删除</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-9">
<h2 id="data">数据统计</h2>
<div class="row">
<div class="col-sm-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">用户数量</h5>
<p class="card-text">1000</p>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">订单数量</h5>
<p class="card-text">5000</p>
</div>
</div>
</div>
<div class="col-sm-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">销售额</h5>
<p class="card-text">1000000元</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-9">
<h2 id="config">系统配置</h2>
<form>
<div class="form-group">
<label for="email">邮箱地址:</label>
<input type="email" class="form-control" id="email" placeholder="Enter email" name="email">
</div>
<div class="form-group">
<label for="pwd">密码:</label>
<input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pswd">
</div>
<div class="form-group form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" name="remember"> 记住我
</label>
</div>
<button type="submit" class="btn btn-primary">保存</button>
</form>
</div>
</div>
</div>
</body>
</html>
```
上述代码使用了Bootstrap框架,包括了导航栏、表格、卡片和表单等组件,可以快速搭建一个简单的后台管理页面。
阅读全文