博客列表 >Bootstrap实现完整用户登陆页面_2018-09-25

Bootstrap实现完整用户登陆页面_2018-09-25

theYon的博客
theYon的博客原创
2018年09月27日 21:10:461828浏览

Bootstrap实现完整用户登陆页面

主要知识点

Bootstrap表单的布局

代码

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="../dist/css/bootstrap.min.css">
  <title>用户登陆</title>
</head>
<body>
  <div class="container">
    <h2 style="text-align:center">用户登陆</h2>
    <div class="row">
      <div class="col-md-6 col-md-offset-3">
        <form class="form-horizontal">
          <div class="form-group">
            <label for="exampleInputEmail1" class="col-sm-3 control-label">邮箱</label>
            <div class="col-sm-9">
              <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
            </div>
          </div>

          <div class="form-group">
            <label for="exampleInputPassword1" class="col-sm-3 control-label">密码</label>
            <div class="col-sm-9">
              <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-offset-3 col-sm-9">
              <div class="checkbox">
                <label>
                  <input type="checkbox"> 记住密码
                </label>
              </div>
            </div>
          </div>

          <div class="form-group">
            <div class="col-sm-offset-3 col-sm-9">
              <button type="submit" class="btn btn-primary btn-block">登陆</button>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</body>
<script src="../dist/js/jquery.min.js"></script>
<script src="../dist/js/bootstrap.min.js"></script>
</html>

布局效果

TIM截图20180927210957.png

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议