Web端登录页和注册页源码

news/2024/7/8 6:20:29 标签: 前端, css3, javascript, 登录页面, 注册界面

前言:登录页面前端开发中最常见的页面,下面是登录页面效果图和源代码,CV大法直接拿走。


1、登录页面

源代码:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>登录</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        height: 100vh;
        background-color: aquamarine;
        background: url("https://images.pexels.com/photos/936722/pexels-photo-936722.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1") no-repeat;
        background-size: cover;
      }

      .Box {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 550px;
        height: 330px;
        display: flex;
      }

      .left {
        position: relative;
        width: 50%;
        height: 100%;
        background-color: rgba(57, 99, 134, 0.75);
      }

      .right {
        position: relative;
        width: 50%;
        height: 100%;
        background-color: rgba(255, 255, 255, 1);
      }

      .centerBox {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        text-align: center;
      }

      .left img {
        width: 50px;
        height: 50px;
        margin-bottom: 5px;
      }

      .left p {
        font-size: 14px;
        color: #fff;
      }

      .left h4 {
        font-size: 18px;
        color: #fff;
        margin-bottom: 10px;
      }

      .right form {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        text-align: center;
      }

      h3 {
        margin-bottom: 20px;
      }

      input {
        width: 100%;
        height: 30px;
        border: 1px solid #767676;
        background-color: transparent;
        padding-left: 10px;
        font-size: 12px;
        color: #000000;
        margin-bottom: 15px;
        outline: none;
      }

      .loginBtn {
        width: 100%;
        height: 35px;
        line-height: 32px;
        text-align: center;
        font-size: 15px;
        color: #fff;
        border-radius: 6px;
        background: rgb(57, 99, 134);
        outline: none;
        border: none;
        margin-top: 10px;
      }

      .no {
        cursor: pointer;
        margin-top: 30px;
        text-align: center;
        font-size: 12px;
        color: #828282;
      }
    </style>
  </head>
  <body>
    <div class="Box">
      <div class="left">
        <div class="centerBox">
          <img src="https://img0.baidu.com/it/u=2804005887,994501744&fm=253&fmt=auto&app=138&f=JPEG?w=200&h=200"
            alt="">
          <h4>某某后台管理系统</h4>
          <p>This is a description</p>
        </div>
      </div>
      <div class="right">
        <form action="">
          <h3>欢迎登录</h3>
          <input type="text" placeholder="请输入账号" required>
          <input type="password" placeholder="请输入密码" required>
          <input type="submit" class="loginBtn" value="登录"></button>
          <p class="no">没有账号?立即注册</p>
        </form>

      </div>
    </div>
  </body>
</html>

2、注册页面

源代码:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>注册</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }

      body {
        height: 100vh;
        background: url("https://images.pexels.com/photos/290595/pexels-photo-290595.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1") no-repeat;
        background-size: cover;
      }


      .Box {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 650px;
        height: 400px;
        display: flex;
      }

      .left {
        position: relative;
        width: 45%;
        height: 100%;
        background: url("https://img0.baidu.com/it/u=4234357226,4114415663&fm=253&fmt=auto&app=138&f=PNG?w=900&h=462") no-repeat;
        background-size: cover;
      }

      .right {
        position: relative;
        width: 55%;
        height: 100%;
        background-color: rgba(255, 255, 255, 1);
      }

      .centerBox {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        text-align: center;
      }

      .left img {
        width: 50px;
        height: 50px;
        margin-bottom: 5px;
      }

      .left p {
        font-size: 14px;
        color: #fff;
      }

      .left h4 {
        font-size: 18px;
        color: #fff;
        margin-bottom: 10px;
      }

      .right form {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 80%;
        text-align: center;
      }

      h3 {
        margin-bottom: 20px;
        color: #5f89ca;
      }

      input {
        width: 100%;
        height: 30px;
        border: 1px solid #5f89ca;
        background-color: transparent;
        padding-left: 10px;
        font-size: 12px;
        color: #000000;
        margin-bottom: 15px;
        outline: none;
      }

      .loginBtn {
        width: 100%;
        height: 35px;
        line-height: 32px;
        text-align: center;
        font-size: 15px;
        color: #fff;
        background: #5f89ca;
        outline: none;
        border: none;
        margin-top: 10px;
      }

      .loginBtn:hover {
        cursor: pointer;
        background-color: deepskyblue;
      }

      .no {
        cursor: pointer;
        margin-top: 10px;
        text-align: center;
        font-size: 12px;
        color: #828282;
      }

      .yzmBox {
        display: flex;
        justify-content: flex-start;
      }

      .yzmBox input {
        width: 70%;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
      }

      .yzmBox .btn {
        cursor: pointer;
        width: 29%;
        background-color: #5f89ca;
        color: #ffffff;
        height: 30px;
        outline: none;
        border: 1px solid #5f89ca;
        font-size: 12px;
        margin-left: 1%;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
      }
    </style>
  </head>
  <body>
    <div class="Box">
      <div class="left">
        <div class="centerBox">
          <img src="https://img0.baidu.com/it/u=2804005887,994501744&fm=253&fmt=auto&app=138&f=JPEG?w=200&h=200"
            alt="">
          <h4>某某后台管理系统</h4>
          <p>This is a description</p>
        </div>
      </div>
      <div class="right">
        <form action="">
          <h3>新用户注册</h3>
          <input type="text" placeholder="请输入用户名" required>
          <input type="password" placeholder="请输入密码" required>
          <input type="password" placeholder="请再次输入密码" required>
          <input type="text" placeholder="请输入手机号" required>
          <div class="yzmBox">
            <input type="text" placeholder="请输入验证码">
            <button class="btn">发送</button>
          </div>
          <input type="submit" class="loginBtn" value="注册"></button>
          <p class="no">已有账号?<span style="text-decoration: underline;cursor: pointer;">去登陆</span></p>
        </form>
      </div>
    </div>
  </body>
</html>


http://www.niftyadmin.cn/n/5536714.html

相关文章

远程分支删除后,vscode工具依旧显示问题

当远程分支删除后&#xff0c;vscode中依旧显示删除的分支 打开控制台输入命令&#xff1a;git remote prune origin 就可以了 git-remote命令用于管理您所跟踪的分支的存储库集(“远程”)。 git remote prune origin: 将删除origin下陈旧的远程跟踪分支

阿里云物联网应用层开发:第三部分,微信小程序和web客户端实现

文章目录 哔哩哔哩视频教程1、阿里云物联网平台对接微信小程序2、阿里云物联网平台对接web客户端2-1MQTT服务器编写2-2 web端Servlet部分编写备注哔哩哔哩视频教程 【阿里云物联网综合开发,STM32+ESP8266+微信小程序+web客户端一篇教程详细讲解】 https://www.bilibili.com/v…

植物大战僵尸融合嫁接版 MAC 版本下载安装详细教程

继植物大战僵尸杂交版火了之后&#xff0c;PVZ改版可谓是百花齐放&#xff0c;最近又有一个非常好玩的模式被开发出来了&#xff0c;他们称为《植物大战僵尸融合嫁接版》 该版本并没有对植物卡牌做改动&#xff0c;而是可以将任意两种植物叠放到一起进行融合&#xff0c;产生新…

养老院生活管理系统

摘要 随着全球范围内人口老龄化趋势的日益加剧&#xff0c;养老院作为老年人生活的重要场所&#xff0c;其生活管理问题也显得愈发突出和重要。为了满足养老院在日常生活管理、老人健康监护、服务人员管理等多方面的需求&#xff0c;提高管理效率和服务质量。决定设计并实现了…

一分钟学习数据安全—自主管理身份SSI分布式加密密钥管理

在这篇之前&#xff0c;我们已经对SSI有了一个全局的了解。这个系列的文章可以作为一个学习笔记来参考&#xff0c;真正要实践其中的一些方案、协议&#xff0c;还需要参考专业的书籍和官方文档。作为一个SSI系列学习笔记的最后一篇&#xff0c;我们做一个简单的延伸&#xff0…

easyexcel使用小结-未完待续

官网&#xff1a;https://easyexcel.opensource.alibaba.com/docs/current/ <dependency><groupId>com.alibaba</groupId><artifactId>easyexcel</artifactId><version>4.0.1</version></dependency>一、读 1.1简单读 Getter…

Qt篇——QLabel固定尺寸的情况下让字体大小自适应并自动换行以完整显示

当文字较少时&#xff0c;默认字体大小为16&#xff1b;当文字内容较多时&#xff0c;自动换行并缩小字体。 举例&#xff1a; 字体较少时 字体较多时 思路&#xff1a; 设置自动换行属性 setWordWrap&#xff1b;通过QFontMetrics计算文字字体要多大、显示多少行才不会超过…

完整篇-Python数据类型转换

目录 1、「整数到浮点数」&#xff1a; 2、「浮点数到整数」&#xff1a; 3、「字符串到整数」&#xff1a; 4、「字符串到浮点数」&#xff1a; 5、「整数到字符串」&#xff1a; 6、「浮点数到字符串」&#xff1a; 7、「布尔值到整数」&#xff1a; 8、「列表到元组…