ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

注册界面

2019-04-23 11:54:27  阅读:191  来源: 互联网

标签:right 界面 用户注册 color 密码 注册 margin


  • 样式一
    • 例图

       

    • 代码
      <head>
          <meta charset="UTF-8">
          <title>用户注册</title>
          <link href="bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet">
          <script src="https://code.jquery.com/jquery.js"></script>
          <script src="bootstrap-4.3.1-dist/js/bootstrap.js"></script>
          <style>
      
              .container {
                  margin-top: 15%;
                  width: 35%;
              }
      
              .btn-primary {
                  background-color: #337ab7;
                  border-color: #337ab7;
              }
      
              .form-control {
                  margin-bottom: 4px;
              }
      
          </style>
      </head>
      <body>
      <div class="container">
          <form>
              <div class="form-signin">
                  <!--<h2 class="form-signin-heading">注册</h2>-->
                  <!-- class="sr-only"将label标签隐藏 -->
                  <label for="exampleInputUsername" class="sr-only">用户名</label>
                  <input type="text" class="form-control" id="exampleInputUsername" placeholder="用户名">
                  <label for="exampleInputUsername" class="sr-only">密码</label>
                  <input type="password" class="form-control" id="exampleInputPassword" placeholder="密码">
                  <label for="exampleInputUsername" class="sr-only">邮箱</label>
                  <input type="email" class="form-control" id="exampleInputEmail" placeholder="邮箱">
                  <label for="exampleInputUsername" class="sr-only">手机</label>
                  <input type="tel" class="form-control" id="exampleInputPhone" placeholder="手机">
                  <div class="checkbox">
                      <label>
                          <!--<input type="checkbox">
                          记住密码-->
                      </label>
                  </div>
                  <button class="btn btn-lg btn-primary btn-block" type="submit">注册</button>
              </div>
          </form>
      </div>
      
      </body>
      </html>

       

  • 样式二
    • 例图

       

    • 代码
      <head>
          <meta charset="UTF-8">
          <title>用户注册</title>
          <link href="bootstrap-4.3.1-dist/css/bootstrap.min.css" rel="stylesheet">
          <script src="https://code.jquery.com/jquery.js"></script>
          <script src="bootstrap-4.3.1-dist/js/bootstrap.js"></script>
          <style>
      
             .container1 {
                  margin-top: 70px;
                  width: 45%;
                  margin-left: 30%;
              }
      
              /* 需要在一行的元素 */
              .inline-style {
                  display: inline-block;
              }
              /* 文字需要靠右 */
              .font-position-right{
                  text-align: right;
              }
              /* 注册按钮 */
              .register-btn{
                  margin-left: 10%;
              }
      
      
          </style>
      </head>
      <body>
      <div class="container1">
      
          <form class="form-horizontal">
              <div class="form-group">
                  <!--<h2 class="form-signin-heading">注册</h2>-->
                  <!-- class="sr-only"将label标签隐藏 -->
                  <label for="exampleInputUsername1" class="col-sm-2 control-label inline-style font-position-right">用户名</label>
                  <div class="col-sm-9 inline-style ">
                      <input type="text" class="form-control" id="exampleInputUsername1" placeholder="用户名">
                  </div>
              </div>
              <div class="form-group">
                  <!--<h2 class="form-signin-heading">注册</h2>-->
                  <label for="exampleInputUsername1" class="col-sm-2 control-label  inline-style font-position-right">密码</label>
                  <div class="col-sm-9  inline-style">
                      <input type="password" class="form-control" id="exampleInputPassword1" placeholder="密码">
                  </div>
              </div>
              <div class="form-group">
                  <label for="exampleInputUsername1" class="col-sm-2 control-label  inline-style font-position-right">邮箱</label>
                  <div class="col-sm-9  inline-style">
                      <input type="email" class="form-control" id="exampleInputEmail1" placeholder="邮箱">
                  </div>
                  <div class="form-group">
                  </div>
              </div>
              <div class="form-group">
                  <label for="exampleInputUsername1" class="col-sm-2 control-label   inline-style font-position-right">手机</label>
                  <div class="col-sm-9  inline-style">
                      <input type="tel" class="form-control" id="exampleInputPhone1" placeholder="手机">
                  </div>
              </div>
              <div class="form-group">
                  <div class="col-sm-offset-2 col-sm-10">
                      <div class="checkbox">
                          <label>
                              <!--<input type="checkbox">
                              记住密码-->
                          </label>
                      </div>
                  </div>
              </div>
      
              <div class="form-group">
                  <div class="col-sm-offset-2 col-sm-10">
                      <button class="btn btn-lg btn-primary btn-block register-btn" type="submit">注册</button>
                  </div>
      
              </div>
          </form>
      
      </div>
      
      </body>
      </html>

       

  •   

 

标签:right,界面,用户注册,color,密码,注册,margin
来源: https://www.cnblogs.com/fatRabbit-/p/10755472.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有