当前位置:   article > 正文

简单的HTML登录界面_html登录页面代码

html登录页面代码

1

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
  7. <link rel="stylesheet" href="css/login.css">
  8. <title>登陆</title>
  9. </head>
  10. <body>
  11. <main class="main" role="main">
  12. <div class="container">
  13. <div class="row">
  14. <div class="offset-md-3 col-md-6">
  15. <form class="form-container">
  16. <h2>登陆</h2>
  17. <div class="form-group">
  18. <label for="exampleInputEmail1">用户名</label>
  19. <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="请输入用户名">
  20. </div>
  21. <div class="form-group">
  22. <label for="exampleInputPassword1">密码</label>
  23. <input type="password" class="form-control" id="exampleInputPassword1" placeholder="请输入密码">
  24. </div>
  25. <div class="form-group form-check">
  26. <input type="checkbox" class="form-check-input" id="exampleCheck1">
  27. <label class="form-check-label" for="exampleCheck1">记住信息</label>
  28. </div>
  29. <button type="submit" class="btn btn-success btn-block">登录</button>
  30. </form>
  31. </div>
  32. </div>
  33. </div>
  34. </main>
  35. <div class="footer">
  36. <div class="container">
  37. 登录页面 @2020年5月10日
  38. </div>
  39. </div>
  40. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  41. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
  42. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
  43. </body>
  44. </html>

完整的代码:https://download.csdn.net/download/mingzi1245/12406211

2.

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>login</title>
  8. </head>
  9. <body>
  10. <div>
  11. <div>
  12. <!-- 左上角部分 -->
  13. <div class="chrome">
  14. <span>欢迎</span>
  15. <span>使用</span>
  16. </div>
  17. </div>
  18. <!-- 中间部分 -->
  19. <div class="center">
  20. <!-- 登陆框 -->
  21. <div class="user">
  22. <p class="cuser">账号登录</p>
  23. <!-- 用户名密码及登录按钮部分 -->
  24. <div class="form">
  25. <div class="user1">
  26. <img src="images/user.png" alt="">
  27. <input type="text" placeholder="邮箱">
  28. </div>
  29. <div class="user2">
  30. <img src="images/passwd.png" alt="">
  31. <input type="password" placeholder="密码">
  32. </div>
  33. <div>
  34. <button type="button">马上登录</button>
  35. </div>
  36. </div>
  37. <div style="height: 25px;"></div>
  38. <div class="mima">
  39. <p class="jz">
  40. <input type="checkbox" class="box">
  41. <span>记住密码</span>
  42. </p>
  43. <p class="wj">忘记密码?
  44. <a href="#">立即找回</a>
  45. </p>
  46. </div>
  47. </div>
  48. </div>
  49. <!-- 底部部分 -->
  50. <div class="foot">
  51. <p class="banquan">
  52. 2020年5月10日
  53. </p>
  54. </div>
  55. </div>
  56. </div>
  57. </body>
  58. </html>

完整的代码:https://download.csdn.net/download/mingzi1245/12406208 

 

3

 html代码

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>后台管理系统</title>
  6. </head>
  7. <body>
  8. <div class="logo_box"><img class="logo_img" src="images/login_logo.png"></div>
  9. <div class="login_box">
  10. <h1 class="title">欢迎登录</h1>
  11. <input class="input_box" type="text" placeholder="用户名">
  12. <input class="input_box" type="password" placeholder="密码">
  13. <input class="button_box" type="button" value="登录">
  14. </div>
  15. </body>
  16. </html>

 css代码

  1. body {
  2. background-color: #8ea4f8;
  3. background-image: url(images/background.jpg);
  4. background-repeat: no-repeat;
  5. background-size: cover; //背景图适应屏幕
  6. }
  7. .login_box {
  8. width: 400px;
  9. height: 400px;
  10. background-color: #fff;
  11. margin: auto;
  12. margin-top: 150px;
  13. border-radius: 5px;
  14. overflow: hidden;//.title设置margin-top无效,给父元素设置overflow:hidden;
  15. }
  16. .title {
  17. text-align: center;
  18. font-size: 28px;
  19. color: #000;
  20. margin-top: 80px;
  21. margin-bottom: 10px;
  22. letter-spacing: 3px;
  23. font-family: sans-serif;
  24. }
  25. .input_box {
  26. width: 300px;
  27. height: 30px;
  28. width: 300px;
  29. height: 40px;
  30. padding-left: 10px;
  31. margin-top: 20px;
  32. margin-left: 50px;
  33. }
  34. .button_box {
  35. width: 300px;
  36. height: 35px;
  37. width: 300px;
  38. height: 40px;
  39. margin-top: 20px;
  40. margin-left: 50px;
  41. border-radius: 5px;
  42. background-color: #64a9d9;
  43. cursor: pointer;
  44. color: #fff;
  45. }
  46. .logo_box {
  47. position: absolute;
  48. background-color: #fff;
  49. width: 100px;
  50. height: 100px;
  51. border-radius: 100px;
  52. top: 100px;
  53. left: 46%;
  54. border: solid 5px #A68364;
  55. text-align: center;
  56. }
  57. .logo_img {
  58. margin-top: 20px;
  59. }

完整的代码:https://download.csdn.net/download/mingzi1245/12406204

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/664495
推荐阅读
相关标签
  

闽ICP备14008679号