Bootstrap Notes - login page

1.bootstrap Chinese official website

https://www.bootcss.com/

 

2. Step

2.1 Basic copy the template code

https://v3.bootcss.com/getting-started/#template

2.2 Copy the code page header

https://v3.bootcss.com/components/#page-header

2.3 Create a login box middle and bottom part div div

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录界面
    </title>
     <!-- Bootstrap -->
     <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">

    </head>
<body>
<!-- 标题 -->
    <div class="page-header">
        <h1>XXXX信息系统登录界面</h1>
   </div>
<!-- 中间登录框 -->
      <div class="container-fluid">
        <div class="row">
          
          </div> 
        </ div> 
<!-- 页脚 -->
        <div class = "footer"> 
                <the p-> & Copy; Copyright: XXXXX XX City College Avenue, No. XXX XX </ the p->   
                <the p-> Zip Code: 530001 Contact E-mail: [email protected] </ p> 
        </ div> 
      </ div> 
         
    

       <-! jQuery (JavaScript plugin Bootstrap all are dependent on jQuery, it must be placed in the front) -> 
       <Script src = "https://cdn.jsdelivr.net/npm/jquery 1.12.4 @ / dist / jquery.min.js "> </ Script> 
       <-! all the Bootstrap JavaScript plug-ins loaded. You can also load only a single plug-in needed. -> 
       <Script the src = "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"> </ Script> 
</ body> 
</ HTML>
View Code

2.4 Copy arranged horizontally to form an intermediate frame portion div login

https://v3.bootcss.com/css/#forms-horizontal

2.5 adjustment pattern (a plurality of classes may be applied Html tab style, separated by a space)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录界面
    </title>
     <!-- Bootstrap -->
     <script src="js/jquery-3.4.1.js"></script>
     <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<style>

    .bg{
        height: 600px;
        background-image:url(/images/bg.jpg);
        background-size:cover;
    }

    .form{
        padding: 40px;
       margin-top: 175px;
       background: rgba(255,255,255,0.2);
    }

   .footer{
    height: 60px;
    padding-top:20px; 
    font-size: 14px;
    font-weight: bold;
    text-align: center;
   }
   

   
</style>
    </head>
<body>
    <div class="page-header">
        <h1>XXXX信息系统登录界面</h1>
   </div>
      <div class="container-fluid">
        <div class="row bg">
          <div class="col-md-offset-6 col-md-4 col-sm-offset-3 col-sm-7 col-xs-offset-2 col-xs-8 col-lg-offset-6 col-lg-3 form">
            <form class="form-horizontal">
                <div class="form-group">
                  <label for="username" class="col-sm-4 control-label">用户名</label>
                  <div class="col-sm-8">
                    <input type="text" class="form-control" id="username" placeholder="请输入用户名">
                  </div>
                </div>
                <div class="form-group">
                  <label for="password" class="col-sm-4 control-label">密码</label>
                  <div class="col-sm-8">
                    <input type="password" class="form-control" id="password" placeholder="请输入密码">
                  </div>
                </div>
                <div class="form-group">
                    <label for="validateCode" class="col-sm-4 control-label">验证码</label>
                    <div class="col-sm-4">= "form-Control" ID = "validateCode" placeholder = "Please enter PIN">class
                      <INPUT type = "text"
                    </div>
                    <div class="col-sm-4">
                        <img src="images/yzm.jpg" alt="" width="75px" height="35px">
                      </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 type="button" id="submitBtn" class="btn btn-success" value="登录" style="width: 50%;"></button>
                  </div>
                </div>
              </form>
              <span style="color: red;" id="tip"></span>
          </div> 
        </div>

        <div class="footer">
                <p>©版权所有:XXXXX学院XX市XX大道XXX号</p>  
                <p>Postal Code: 530001 Contact E-mail: [email protected] </ the p-> 
      </ div>
        </ div>
         
 
       <-! JQuery (JavaScript plugin Bootstrap all are dependent on jQuery, it must be placed in the front) -> 
       <Script src = "https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery .min.js "> </ Script> 
       <-! all the Bootstrap JavaScript plug-ins loaded. You can also load only a single plug-in needed. -> 
       <Script the src = "https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"> </ Script> 
</ body> 
</ HTML>

3. Run renderings (a simple login screen)

 

Guess you like

Origin www.cnblogs.com/YorkZhangYang/p/12538576.html