1.用水平表单制作一个完整用户登陆页面:
实例
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>水平表单用户登录页面</title> <link rel="stylesheet" href="../lib/dist/css/bootstrap.css"> </head> <body> <h3 style="text-align: center">用户登录</h3> <form class="form-horizontal"> <div class="form-group"> <label for="inputEmail" class="col-sm-2 control-label">邮箱:</label> <div class="col-sm-8"> <input type="email" class="form-control" id="inputEmail" placeholder="Email"> </div> </div> <div class="form-group"> <label for="inputPassword" class="col-sm-2 control-label">密码:</label> <div class="col-sm-8"> <input type="password" class="form-control" id="inputPassword" placeholder="Password"> </div> </div> <div class="form-group"> <div class="col-sm-8 col-sm-offset-2"> <input type="checkbox" checked>记住密码 </div> </div> <div class="form-group"> <div class="col-sm-8 col-sm-offset-2"> <button type="submit" class="btn btn-success">登录</button> </div> </div> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例