素雅的登录界面,简单而优雅

先上效果图:
素雅的登录界面,简单而优雅_第1张图片

再上代码:

DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Titletitle>
  <style>
    *, *::after, *::before {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      user-select: none;
    }

    /* Generic */
    body {
      width: 100%;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      font-family: "Montserrat", sans-serif;
      font-size: 12px;
      background-color: #ecf0f3;
      color: #a0a5a8;
    }

    /**/
    .main {
      position: relative;
      width: 1000px;
      min-width: 1000px;
      min-height: 600px;
      height: 600px;
      padding: 25px;
      background-color: #ecf0f3;
      box-shadow: 10px 10px 10px #d1d9e6, -10px -10px 10px #f9f9f9;
      border-radius: 12px;
      overflow: hidden;
    }
    @media (max-width: 1200px) {
      .main {
        transform: scale(0.7);
      }
    }
    @media (max-width: 1000px) {
      .main {
        transform: scale(0.6);
      }
    }
    @media (max-width: 800px) {
      .main {
        transform: scale(0.5);
      }
    }
    @media (max-width: 600px) {
      .main {
        transform: scale(0.4);
      }
    }

    .container {
      display: flex;
      justify-content: center;
      align-items: center;
      position: absolute;
      top: 0;
      width: 600px;
      height: 100%;
      padding: 25px;
      background-color: #ecf0f3;
      transition: 1.25s;
    }

    .form {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      width: 100%;
      height: 100%;
    }
    .form__icon {
      object-fit: contain;
      width: 30px;
      margin: 0 5px;
      opacity: 0.5;
      transition: 0.15s;
    }
    .form__icon:hover {
      opacity: 1;
      transition: 0.15s;
      cursor: pointer;
    }
    .form__input {
      width: 350px;
      height: 40px;
      margin: 4px 0;
      padding-left: 25px;
      font-size: 13px;
      letter-spacing: 0.15px;
      border: none;
      outline: none;
      font-family: "Montserrat", sans-serif;
      background-color: #ecf0f3;
      transition: 0.25s ease;
      border-radius: 8px;
      box-shadow: inset 2px 2px 4px #d1d9e6, inset -2px -2px 4px #f9f9f9;
    }
    .form__input:focus {
      box-shadow: inset 4px 4px 4px #d1d9e6, inset -4px -4px 4px #f9f9f9;
    }
    .form__span {
      margin-top: 30px;
      margin-bottom: 12px;
    }
    .form__link {
      color: #181818;
      font-size: 15px;
      margin-top: 25px;
      border-bottom: 1px solid #a0a5a8;
      line-height: 2;
    }

    .title {
      font-size: 34px;
      font-weight: 700;
      line-height: 3;
      color: #181818;
    }

    .description {
      font-size: 14px;
      letter-spacing: 0.25px;
      text-align: center;
      line-height: 1.6;
    }

    .button {
      width: 180px;
      height: 50px;
      border-radius: 25px;
      margin-top: 50px;
      font-weight: 700;
      font-size: 14px;
      letter-spacing: 1.15px;
      background-color: #4B70E2;
      color: #f9f9f9;
      box-shadow: 8px 8px 16px #d1d9e6, -8px -8px 16px #f9f9f9;
      border: none;
      outline: none;
    }

    /**/
    .a-container {
      z-index: 100;
      left: calc(100% - 600px );
    }

    .b-container {
      left: calc(100% - 600px );
      z-index: 0;
    }

    .switch {
      display: flex;
      justify-content: center;
      align-items: center;
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 400px;
      padding: 50px;
      z-index: 200;
      transition: 1.25s;
      background-color: #ecf0f3;
      overflow: hidden;
      box-shadow: 4px 4px 10px #d1d9e6, -4px -4px 10px #f9f9f9;
    }
    .switch__circle {
      position: absolute;
      width: 500px;
      height: 500px;
      border-radius: 50%;
      background-color: #ecf0f3;
      box-shadow: inset 8px 8px 12px #d1d9e6, inset -8px -8px 12px #f9f9f9;
      bottom: -60%;
      left: -60%;
      transition: 1.25s;
    }
    .switch__circle--t {
      top: -30%;
      left: 60%;
      width: 300px;
      height: 300px;
    }
    .switch__container {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      position: absolute;
      width: 400px;
      padding: 50px 55px;
      transition: 1.25s;
    }
    .switch__button {
      cursor: pointer;
    }
    .switch__button:hover {
      box-shadow: 6px 6px 10px #d1d9e6, -6px -6px 10px #f9f9f9;
      transform: scale(0.985);
      transition: 0.25s;
    }
    .switch__button:active, .switch__button:focus {
      box-shadow: 2px 2px 6px #d1d9e6, -2px -2px 6px #f9f9f9;
      transform: scale(0.97);
      transition: 0.25s;
    }

    /**/
    .is-txr {
      left: calc(100% - 400px );
      transition: 1.25s;
      transform-origin: left;
    }

    .is-txl {
      left: 0;
      transition: 1.25s;
      transform-origin: right;
    }

    .is-z200 {
      z-index: 200;
      transition: 1.25s;
    }

    .is-hidden {
      visibility: hidden;
      opacity: 0;
      position: absolute;
      transition: 1.25s;
    }

    .is-gx {
      animation: is-gx 1.25s;
    }

    @keyframes is-gx {
      0%, 10%, 100% {
        width: 400px;
      }
      30%, 50% {
        width: 500px;
      }
    }
    header {
      top: 0;
      position: fixed;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 0 1% 1%;
      width: 100%;
      z-index: 3;
      height: 7em;
      font-family: "Bebas Neue", sans-serif;
      font-size: clamp(0.66rem, 2vw, 1rem);
      letter-spacing: 0.5em;
    }

    a{
      color: #B3B8BC;
      text-decoration: none;
    }
  style>
head>
<body>
<header>
  <div>Animated Sectionsdiv>
  <div><a href="https://blog.csdn.net/qq_35241329?type=blog">Original By TiMi先生a>div>
header>
<div class="main">
  <div class="container a-container" id="a-container">
    <form class="form" id="a-form" method="" action="">
      <h2 class="form_title title">Create Accounth2>
      <div class="form__icons"><img class="form__icon" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSI1MHB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA1MCA1MCIgd2lkdGg9IjUwcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48dGl0bGUvPjxkZWZzLz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1b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Q2OSwxNi45NDg0MjQ2IEwzMS45MTUwMzI0LDE2LjM5NDk2NSBDMzEuNDg1ODM0NiwxNi4wOTMwNzggMzAuODgxNzc4NiwxNS43NTc2NDggMzAuNTYzODU0MywxNS42NTcwMTkgQzI5Ljc1MzE0NzQsMTUuNDIyMjE4IDI4LjUxMzI0MjgsMTUuNDU1NzYxIDI3Ljc4MjAxNjksMTUuNzI0MTA1IEMyNS43OTQ5OTAzLDE2LjQ3ODgyMjYgMjQuNTM5MTg5NCwxOC40MjQzMTY4IDI0LjY4MjI1NTQsMjAuNTU0Mjk3NSBDMjQuNjgyMjU1NCwyMC41NTQyOTc1IDI0LjUzOTE4OTQsMTguNDI0MzE2OCAyNC42ODIyNTU0LDIwLjU1NDI5NzUgWiBNMjQuNjgyMjU1NCwyMC41NTQyOTc1IiBpZD0iT3ZhbC0xIi8+PC9nPjwvZz48L3N2Zz4=">div><span class="form__span">or use email for registrationspan>
      <input class="form__input" type="text" placeholder="Name">
      <input class="form__input" type="text" placeholder="Email">
      <input class="form__input" type="password" placeholder="Password">
      <button class="form__button button submit">SIGN UPbutton>
    form>
  div>
  <div class="container b-container" id="b-container">
    <form class="form" id="b-form" method="" action="">
      <h2 class="form_title title">Sign in to Websiteh2>
      <div class="form__icons"><img class="form__icon" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSI1MHB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA1MCA1MCIgd2lkdGg9IjUwcHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48dGl0bGUvPjxkZWZzLz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW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NDg0MjQ2IEwzMS45MTUwMzI0LDE2LjM5NDk2NSBDMzEuNDg1ODM0NiwxNi4wOTMwNzggMzAuODgxNzc4NiwxNS43NTc2NDggMzAuNTYzODU0MywxNS42NTcwMTkgQzI5Ljc1MzE0NzQsMTUuNDIyMjE4IDI4LjUxMzI0MjgsMTUuNDU1NzYxIDI3Ljc4MjAxNjksMTUuNzI0MTA1IEMyNS43OTQ5OTAzLDE2LjQ3ODgyMjYgMjQuNTM5MTg5NCwxOC40MjQzMTY4IDI0LjY4MjI1NTQsMjAuNTU0Mjk3NSBDMjQuNjgyMjU1NCwyMC41NTQyOTc1IDI0LjUzOTE4OTQsMTguNDI0MzE2OCAyNC42ODIyNTU0LDIwLjU1NDI5NzUgWiBNMjQuNjgyMjU1NCwyMC41NTQyOTc1IiBpZD0iT3ZhbC0xIi8+PC9nPjwvZz48L3N2Zz4=">div><span class="form__span">or use your email accountspan>
      <input class="form__input" type="text" placeholder="Email">
      <input class="form__input" type="password" placeholder="Password"><a class="form__link">Forgot your password?a>
      <button class="form__button button submit">SIGN INbutton>
    form>
  div>
  <div class="switch" id="switch-cnt">
    <div class="switch__circle">div>
    <div class="switch__circle switch__circle--t">div>
    <div class="switch__container" id="switch-c1">
      <h2 class="switch__title title">Welcome Back !h2>
      <p class="switch__description description">To keep connected with us please login with your personal infop>
      <button class="switch__button button switch-btn">SIGN INbutton>
    div>
    <div class="switch__container is-hidden" id="switch-c2">
      <h2 class="switch__title title">Hello Friend !h2>
      <p class="switch__description description">Enter your personal details and start journey with usp>
      <button class="switch__button button switch-btn">SIGN UPbutton>
    div>
  div>
div>
<script src="main.js">script>
body>
html>
body>
<script>
  /*
         Designed by: SELECTO
         Original image: https://dribbble.com/shots/5311359-Diprella-Login
 */

  let switchCtn = document.querySelector("#switch-cnt");
  let switchC1 = document.querySelector("#switch-c1");
  let switchC2 = document.querySelector("#switch-c2");
  let switchCircle = document.querySelectorAll(".switch__circle");
  let switchBtn = document.querySelectorAll(".switch-btn");
  let aContainer = document.querySelector("#a-container");
  let bContainer = document.querySelector("#b-container");
  let allButtons = document.querySelectorAll(".submit");

  let getButtons = (e) => e.preventDefault()

  let changeForm = (e) => {

    switchCtn.classList.add("is-gx");
    setTimeout(function(){
      switchCtn.classList.remove("is-gx");
    }, 1500)

    switchCtn.classList.toggle("is-txr");
    switchCircle[0].classList.toggle("is-txr");
    switchCircle[1].classList.toggle("is-txr");

    switchC1.classList.toggle("is-hidden");
    switchC2.classList.toggle("is-hidden");
    aContainer.classList.toggle("is-txl");
    bContainer.classList.toggle("is-txl");
    bContainer.classList.toggle("is-z200");
  }

  let mainF = (e) => {
    for (var i = 0; i < allButtons.length; i++)
      allButtons[i].addEventListener("click", getButtons );
    for (var i = 0; i < switchBtn.length; i++)
      switchBtn[i].addEventListener("click", changeForm)
  }

  window.addEventListener("load", mainF);

script>
html>

你可能感兴趣的:(CSS,css,html,css3)