利用已学到的知识,写一个简单的网站后台界面:
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>网站后台界面</title> <link rel="stylesheet" href="../lib/dist/css/bootstrap.css"> <script src="../jquery-3.3.1.js"></script> <script src="../lib/dist/js/bootstrap.js"></script> <style> #declare1 *, #declare2 *, #declare3 *, a[href="#declare1"],a[href="#declare2"] ,a[href="#declare3"] {border-radius: 0;} </style> </head> <body> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">XX后台管理</a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li class="active"><a href="#">管理员后台</a></li> <li><a href="#">用户列表</a></li> </ul> </div><!-- /.navbar-collapse --> </div><!-- /.container-fluid --> </nav> <!--<div class="list-group col-md-3">--> <!--<button type="button" class="list-group-item"><span class="badge">14</span>Cras justo odio</button>--> <!--<button type="button" class="list-group-item"><span class="badge">3</span>Dapibus ac facilisis in</button>--> <!--<button type="button" class="list-group-item"><span class="badge">1</span>Morbi leo risus</button>--> <!--<button type="button" class="list-group-item">Porta ac consectetur ac</button>--> <!--<button type="button" class="list-group-item">Vestibulum at eros</button>--> <!--</div>--> <div class="col-md-1"> <a href="#declare1" class="btn btn-primary" data-toggle="collapse">用户管理</a> <div class="collapse" id="declare1"> <div class="btn-group-vertical"> <a href="" class="btn btn-default">修改密码</a> <a href="" class="btn btn-default">用户列表</a> <a href="" class="btn btn-default">积分查询</a> </div> </div> <br> <a href="#declare2" class="btn btn-primary" data-toggle="collapse">商品管理</a> <div class="collapse" id="declare2"> <div class="btn-group-vertical"> <a href="" class="btn btn-default">分类管理</a> <a href="" class="btn btn-default">促销管理</a> <a href="" class="btn btn-default">订单管理</a> </div> </div> <br> <a href="#declare3" class="btn btn-primary" data-toggle="collapse">业务系统</a> <div class="collapse" id="declare3"> <div class="btn-group-vertical"> <a href="" class="btn btn-default">车间管理</a> <a href="" class="btn btn-default">财务管理</a> <a href="" class="btn btn-default">报销管理</a> </div> </div> </div> <div style="padding:20px 0;" class="col-md-11"> <p>当前位置>管理员后台>用户列表</p> <hr> <div style="text-align:left; line-height:30px; border:1px solid #f6f6f8; height:30px;"> 用户列表</div> <br> <div style="float:right;padding:10px;"> <button class="glyphicon glyphicon-refresh">刷新</button> <button class="glyphicon glyphicon-trash">删除</button> <button class="glyphicon glyphicon-edit">编辑</button> </div> <br> <table class="table table-bordered"> <tr> <th>选择</th> <th>用户名</th> <th>用户角色</th> <th>联系方式</th> <th>IP地址</th> <th>编辑</th> <th>删除</th> </tr> <tr> <th scope="row"><input type="checkbox" aria-label="..."></th> <td>admin</td> <td>系统管理员</td> <td>1235551332</td> <td>192.168.0.124</td> <td><a class="glyphicon glyphicon-edit" href="">编辑</a></td> <td><a class="glyphicon glyphicon-trash" href="">删除</a></td> </tr> <tr> <th scope="row"><input type="checkbox" aria-label="..."></th> <td>admin</td> <td>系统管理员</td> <td>1235551332</td> <td>192.168.0.124</td> <td><a class="glyphicon glyphicon-edit" href="">编辑</a></td> <td><a class="glyphicon glyphicon-trash" href="">删除</a></td> </tr> <tr> <th scope="row"><input type="checkbox" aria-label="..."></th> <td>admin</td> <td>系统管理员</td> <td>1235551332</td> <td>192.168.0.124</td> <td><a class="glyphicon glyphicon-edit" href="">编辑</a></td> <td><a class="glyphicon glyphicon-trash" href="">删除</a></td> </tr> <tr> <th scope="row"><input type="checkbox" aria-label="..."></th> <td>admin</td> <td>系统管理员</td> <td>1235551332</td> <td>192.168.0.124</td> <td><a class="glyphicon glyphicon-edit" href="">编辑</a></td> <td><a class="glyphicon glyphicon-trash" href="">删除</a></td> </tr> <tr> <th scope="row"><input type="checkbox" aria-label="..."></th> <td>admin</td> <td>系统管理员</td> <td>1235551332</td> <td>192.168.0.124</td> <td><a class="glyphicon glyphicon-edit" href="">编辑</a></td> <td><a class="glyphicon glyphicon-trash" href="">删除</a></td> </tr> <tr> <th scope="row"><input type="checkbox" aria-label="..."></th> <td>admin</td> <td>系统管理员</td> <td>1235551332</td> <td>192.168.0.124</td> <td><a class="glyphicon glyphicon-edit" href="">编辑</a></td> <td><a class="glyphicon glyphicon-trash" href="">删除</a></td> </tr> <tr> <th scope="row"><input type="checkbox" aria-label="..."></th> <td>admin</td> <td>系统管理员</td> <td>1235551332</td> <td>192.168.0.124</td> <td><a class="glyphicon glyphicon-edit" href="">编辑</a></td> <td><a class="glyphicon glyphicon-trash" href="">删除</a></td> </tr> </table> <div style="padding:0;width:390px;" class="btn-toolbar pull-right" role="toolbar" aria-label="..."> <div style="margin-right:5px;margin-left:0"class="btn-group" role="group" aria-label="..."> <button class="btn btn-default"><</button> <button class="btn btn-default">1</button> <button class="btn btn-default">2</button> <button class="btn btn-default">3</button> <button class="btn btn-default">4</button> <button class="btn btn-default">></button> </div> <div style="padding:0" class="col-md-4"> <div class="input-group"> <span class="input-group-addon">转到</span> <input style="text-align: center" class="form-control" type="text"> <span class="input-group-addon">页</span> </div> </div> <button class="btn btn-warning" type="button">GO</button> </div> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例