div+css实现大气登录注册表单页面代码

代码语言:html

所属分类:表单美化

代码描述:div+css实现大气登录注册表单页面代码,输入框和按钮有交互动画。

代码标签: div css 大气 登录 注册 表单 页面 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
<style>
    @import url("https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,700");
html,
body {
  font-family: "IBM Plex Sans", linkMacSystemFont, San Francisco, Roboto, Helvetica Neue, Segoe UI, sans-serif;
  -webkit-text-size-adjust: 100%;
     -moz-text-size-adjust: 100%;
          text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.container {
  background: #101010;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url(//repo.bfw.wiki/bfwrepo/icon/6056bf753c238.jpg);
  background-position: center;
  background-size: cover;
  padding: 60px 30px;
  min-height: 100vh;
  height: 100%;
  width: 100vw;
  overflow-y: auto;
}
.container:before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(16, 16, 16, 0.4);
}

@-webkit-keyframes form-open {
  0% {
    -webkit-clip-path: polygon(0 20px, 20px 0, 20px 0, 20px 0, 0 20px, 0 20px);
            clip-path: polygon(0 20px, 20px 0, 20px 0, 20px 0, 0 20px, 0 20px);
  }
  50% {
    -webkit-clip-path: polygon(0 20px, 20px 0, 20px 0, 20px calc(100% - 20px), 0 100%, 0 100%);
            clip-path: polygon(0 20px, 20px 0, 20px 0, 20px calc(100% - 20px), 0 100%, 0 100%);
  }
  100% {
    -webkit-clip-path: polygon(0 20px, 20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
            clip-path: polygon(0 20px, 20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  }
}

@keyframes form-open {
  0% {
    -webkit-clip-path: polygon(0 20px, 20px 0, 20px 0, 20px 0, 0 20px, 0 20px);
            clip-path: polygon(0 20px, 20px 0, 20px 0, 20px 0, 0 20px, 0 20px);
  }
  50% {
    -webkit-clip-path: polygon(0 20px, 20px 0, 20px 0, 20px calc(100% - 20px), 0 100%, 0 100%);
            clip-path: polygon(0 20px, 20px 0, 20px 0, 20px calc(100% - 20px), 0 100%, 0 100%);
  }
  100% {
    -webkit-clip-path: polygon(0 20px, 20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
            clip-path: polygon(0 20px, 20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  }
}
@-webkit-keyframes fade-in {
  0% {
    opacity: 0;
    transform: translate3d(-16px, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes fade-in {
  0% {
    opacity: 0;
    transform: translate3d(-16px, 0, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
.form {
  display: grid;
  grid-gap: 36px;
  align-items: center;
  justify-content: center;
  max-width: 400px;
  width: 100%;
  padding: 30px;
  overflow: hidden;
  -webkit-clip-path: polygon(0 20px, 20px 0, 20px 0, 20px 0, 0 20px, 0 20px);
          clip-path: polygon(0 20px, 20px 0, 20px 0, 20px 0, 0 20px, 0 20px);
  -webkit-animation: form-open 1s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.5s;
          animation: form-open 1s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.5s;
}
.form > * {
  position: relative;
  opacity: 0;
  -webkit-animation: fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
          animation: fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.form > *:nth-child(2) {
  -webkit-animation-delay: 1.2s;
          animation-delay: 1.2s;
}
.form > *:nth-child(3) {
  -webkit-animation-delay: 1.3s;
          animation-delay: 1.3s;
}
.form > *:nth-child(4) {
  -webkit-animation-delay: 1.4s;
          animation-delay: 1.4s;
}
.form > *:nth-child(5) {
  -webkit-animation-delay: 1.5s;
          animation-delay: 1.5s;
}
.form > *:nth-child(6) {
  -webkit-animation-delay: 1.6s;
          animation-delay: 1.6s;
}

.form__image {
  position: absolute;
  -webkit-animation: none;
          animation: none;
  opacity: 1;
  filter: blur(16px);
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(16, 16, 16, 0.8), rgba(16, 16, 16, 0.8)), url("https://res.cloudinary.com/dokf7npvg/image/upload/v1540355245/0jbUKoX.jpg");
  background-position: center;
  background-size: cover;
}

.form__logo {
  width: 80%;
  height: auto;
  justify-self: center;
}

.input {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input__element {
  border: 0;
  margin: 0;
  width: 100%;
  box-shadow: inset 0 -1px 0 0 rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.3);
  height: 46px;
  transition: box-shadow 0.4s ease;
  padding-left: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}
.input__element:focus {
  box-shadow: inset 0 -2px 0 0 #fdee06;
  outline: none;
}

.input__label {
  font-size: 16px;
  position: absolute;
  left: 10px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.input__element:not(:-moz-placeholder-shown) + .input__label {
  top: -16px;
  left: 0;
  font-size: 14px;
  transform: translate3d(0, -5px, 0);
}

.input__element:not(:-ms-input-placeholder) + .input__label {
  top: -16px;
  left: 0;
  font-size: 14px;
  transform: translate3d(0, -5px, 0);
}

.input__element:focus + .input__label,
.input__element:not(:placeholder-shown) + .input__label {
  top: -16px;
  left: 0;
  font-size: 14px;
  transform: translate3d(0, -5px, 0);
}

.button {
  background: #fdee06;
  border: 0;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  height: 50px;
  -webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
          clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  text-transform: uppercase;
  text-align: left;
  padding: 0 20px;
  cursor: pointer;
}
.button:focus {
  outline: none;
}
.button:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #22edfc;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.button:hover:before, .button:focus:before {
  transform-origin: left center;
  transform: scaleX(1);
}

.button:hover .button__icon,
.button:focus .button__icon {
  transform: translate3d(10px, -50%, 0);
}

.button__label {
  position: relative;
}

.button__icon {
  position: absolute;
  top: 50%;
  transform: translate3d(0, -50%, 0);
  right: 25px;
  width: 24px;
  height: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.button__icon:before {
  content: "";
  height: 1px;
  width: 100%;
  background: black;
  position: absolute;
  left: 0;
  top: 12px;
}
.button__icon:after {
  content: "";
  transform: rotate(45deg);
  border-top: 1px solid black;
  border-right: 1px solid black;
  width: 8px;
  height: 8px;
  position: absolute;
  right: 0;
  top: 8px;
}
</style>
    </head>
    <body>
        <!-- partial:index.partial.html -->
        <main class="container">
            <form class="form" action="" method="get">
                <div class="form__image"></div>
                <svg class="form__logo" xmlns="http://www.w3.org/2000/svg" width="3044" height="840" viewBox="416.5 656.5 3044 840">
                    <g fill="#52BEDC">
                        <path d="M1065.917 1116l2.083-1 2 1 8.084.084 7.333-1.917 6.583-.083 1.833.917 5.167 4h3.918c2.167-1 18.167-18.958 18.167-18.958 4-4.416 13-13.958 13-13.958l-2.25-13.917-5.083-7.167-5.167-.417-9.75-1.667-7.917-4.917-8-5.167-59.917-9-21-2.25-128.417 2.5-86.646 2.854-37.188 1.813 299.416-165.751 5.917.167 37.916 6 31.083-15 25.082-13.334-9.17-8.085-.756-2.67-8.013-4.59-84.772 14.236-335.047 135.725-57.928 17.447-64.854 29.396 6.041 5.042-4.833 1.833-18.667 9-22.332 6.834-7 3.333-60.5 27.667-5.5 4.5L532 1121.167c36.667 16 51 19.833 51 19.833h3.5c72.667-3.667 111.5-9 111.5-9h90.333l106.293-5.667 142.958-9.25 28.333-1.083z"/>
                        <path d="M1340.128 977H1327l-64.667 3.417L1173.75 1046H1152l-14.5-19.25-6-4.5-8.729 7.833s-.428 15.833.947 22.333c0 0 2.642 11.104 7.142 14.604 0 0 14.069 11.739 15.819 14.239 0 0 11.035 10.37 14.91 11.12l16.518-10.253-15.448 20.749-6.162 1.958-4.164 5.166-8.457 16.75-78.624 95.875-5.083 2.167-.667.958-.75 9.875-15.25 15.125-3.75 2.375-.813 1.083L1036 1267.5l-59.25 71-5.75 11.625-2.375 7.125S960 1369.375 955.75 1369l-8.125 11s-12.375 20-20.375 27H929s10-5.125 14.625-10.125c0 0 41.125-52.5 45.5-55.75 0 0 7.5-9.75 10.25-9.75 0 0 3.875-1.375 5.5-3.25 0 0 6.375-8.25 19.125-9 0 0 20.375-15.375 42-20 0 0 3.75-1 6.5 2.625l257.305-312.345L1340.128 977zM2064.376 1177.999s11.75-12.375 15.5-14.375c0 0 5.375-5.75 5.875-9.625l-10.25-3.875-25.125-20.875-45.5-15.25-38.75-13.125-15.208-8.875-5.292-2.375-18-3.625-2.875-3.625 80.875-21.5c-.001.001 72.749-20.624 102.749-34.624l13.5-6.375-6.125-9.375L2057 980l-111.5-1.375-164.5-5.25L1609.667 977 1589 985.667l-12.667 22.667-29.333-.667L1440.667 977 1552 842.75s4.875-5 5.875-12.375c0 0 1.25-16.5-4.75-27.625l3.042-19.583s4.167-3.917 8.083-15.167c0 0 1.917-4.167 6.25-6 0 0 2.583-1.583 4.333-5.417L1592 733.167s.917-3.75-1.333-2.25c0 0-5.167 3.75-12.833 15.833 0 0-.814-3.917-3.657.333 0 0-2.509 5.333-6.509 5.5 0 0-8.917 11.25-8.833 17.167 0 0-4.083 10.5-9.333 10.167L1532 823.75l-87.5 86.75-86.25 106.25-52.75 32.25-13.852 8.734-2.815 3.432-1.917 18.833-44 40.917-3.917 5.167 7 4-27.917 35.25-4.833 8.5 25.75 17.5s37.667 26.417 46.667 30.917l71.333-52.583L1466 1089l70.5-51.333-.833 6.167-11.834 13.166-2.833 1-5.667 7.667-6.25 20.833-23.417 21.833-.75.667-3 4.5-9.917 13.667-1.917 2.75-1.333 2.083 4.333 4.25 1.25 1.75s-2.583 6.75-1.417 8.833l29 22.917s2.583 2.917 6.25 1.083L1519 1167l4.673.067s69.827-23.567 178.827-37.317c0 0 14.875-26.125 17.5-36.75h-8l-58.625-1-11.375 1-13.5 3-17.625 4.75-46.875 6.375s15.125-27.625 19-31l134.625-15.25s5.625-5.375 11.625-17.375c0 0 5.75-7.875 7.75-11.875V1030l-18-.125-108-5 6.5-11.875 64.375-2.875S1686 1001.5 1693 1001l83.875 1.125 10.625-11.375 8.167 35.583s-34.667 40.333-36.333 41.333c-1.667 1-18 23.333-18 23.333l-2.583 3-15.875 35.375 1.125 2.375-12.125 28-15 38.625-2 8.875s14.625 21.125 38 41.125c0 0 22.625-51.625 25.125-57.125l37.667-81.375 40.208 16.5s48.625 21.125 49.875 22.25c0 0 53.5 19.875 58 21.375 0 0 70 27.5 95.625 31 0 0 18.5-15.5 25-23zM1414 1057l-6 3.833-85.833 59.167 51.833-62.833 29.833-34 54.167 3-44 30.833zm429.833-1.333l-24.333-14.833 14.833-34.667s118.667 0 154.5 3.167l14.833 8.5-159.833 37.833zM2649.083 917.25l.605-4.375 3.25-9.687L2652 902h-1.625l-8.281 13.875 2.969.188z"/>
                        <path d="M2597.167 1080l25.667-44.833 26.25-44.333-.334-2.334-4.667-8.5c-8.25-11.333-7.083-22.917-7.083-22.917l5.917-5.5c-.917-.833-1.833-3.25-1.833-3.25-.833-11 3.5-26.25 3.5-26.25l-3.667-.417L2636 923l-82.5 137.75-18.75 22.25-34.75 19.5-26.25 20.25-14.167 6.417-25 15.667-.917-3 15.833-37.75c.667-2 8.5-27.917 8.5-27.917l-.25-7.917-1.25-2.833.167-15.833 77.167-27.583c4.5-34.5 12.417-61.583 12.417-61.583.417-1.083 2.75-3.417 2.75-3.417h-3.875l-2.531.094-5.072-1.572-96.729 7.521-186.958 6.542-38.168 1.414-38.5 44-49.792 75-1.375 2-.833 2-37.333 17.333-16.208.417-2 1.125 4.375 9.458-10 4.833 17 13c10.667 8.167 17 10.583 17 10.583l-3.625 6.75L2074.5 1229l-68 126.167-28.167 64.333-7.167 16.5c4.667-6.333 9.333-7.833 9.333-7.833 9.833-3.5 13.167-12.167 13.167-12.167 16-39.5 28.833-57 28.833-57 5.667-.667 10.833-7 10.833-7l5.667-1.333c13.833-14.833 38.333-28.5 38.333-28.5 10.333-4.833 11.833-10.167 11.833-10.167l12-24.5 53.333-107.333c5.5-14.167 16-32.167 16-32.167 3.167-6.833 7-6.667 7-6.667l231.833-75.5-1.808 2.102-1.358 3.065 2 2.333-18.665 36.167-3.167 6.667-13.5 63.667c-3.667 5.333-2.333 7.833-2.333 7.833l34.167 26.5c7.167-7.333 35.667-27 35.667-27 4.333-2.5 40-27 40-27l19.833-13.167s-8.167 29-12.667 32.667-3.333 11.667-3.333 11.667c7-.167 16.5 7.333 16.5 7.333l26.333 14.5 34-68.333c8.167-16 17.167-29.167 17.167-29.167 4.5-13.5 19-35.667 19-35.667zm-267-39.083l-75 20.833L2221 1069l-9.5 2.667 4.5-9.667v-2.167l10.167-18.708c4.167-8.75 11.917-19.958 11.917-19.958l179.917-12.25-87.834 32zM2856 984h-13l-72.75 57.125-10.625 8.5-3.813 1.625-1.563 2.625-.938 2.625-9.063 31.625-5.875 7.5-10.75 1.625-11.25-14.625-24.625-17.875-15.875-4-68.875 42.5-6.924 5.229-1.284 2.521-.792 5.375-3.875 11.625-10.665 19.583-8.229 20.5-5.28 11.917 1.733-.833 11.075-.333s21.079-4.5 41.163-5.833l6.165-.917 1.833-1.083 48.833-85.833 23.25 96.083 44-1.167 48.875-87.083L2856 984zM3362.001 1337v-6.875l-.938-1.375L3357 1315v-3l-2.167-2-.333-1.625-7.5-6.375v-6.625l-199.291-114.124-74.333-43.5.625-3.75s-1.642-7.642-2.188-7.938c-1.5-.813-3.979-2.063-3.979-2.063l-5.667-2.417L3053 1115l-3.167-2.167L3058 1109l-9.167-6.667.5-1.5-21-12.333-31.333-23-16-9.333 138.334-72.667c9.5-5.833 13.5-11.333 13.5-11.333l75.583-36.917c7-3.25 8.75-5.667 8.75-5.667L3230.25 909c6.416-13.334 23.833-21.167 23.833-21.167L3261 877v-2h-1.5l-6.167 4-13 6-27 12.333-286.833 133.5L2964 961h-8l-4.125-2.874-36.125 20.625-41.625 43.875-32.191 27.405-2.851 4.136 1.417 3.708-13.125 42.75-10.75 8.875-1.5 2.5c-16.125 27.125-25.75 51.75-25.75 51.75 8.625 11.75 44.875 36 44.875 36l1.75-.125c0-2.375 6.625-15.75 6.625-15.75l25-44.375 28.625-51.625 78 43.125c2.875 4.25 7.5 7.5 7.5 7.5L3088 1196l269.25 142.501 5.75 4.5h1.376l.625-1.563-3-4.438z"/>
                    </g>
                    <g fill="#FFF000">
                        <path d="M926 1115h6.042l11.948-1.792-17.969.667zM642.667 1044H650l1.667-1.5 1.521.375 5.563.063.25-.875 3-.063v1h4l2.125 2H671l2.125 2H677l.875-1.188.25-1.75.875.063.938.875 5 .063 1.25 1.938H691l1.125-1.875 6.75-.125.125 2h6l1.063-2 6 .063 1.875 2.938H716l.125-.875 3.813-.094.188-2.031H725l1.938 2 1 .125.125.875H731l.938 5H749l-.125-2.938 1.188-.813 6.875-.031.125 4.781H774l.063-3.938 1.156-1 19.781-.125V1048l5-.188-.063-.875-20 .125-40.563 1-.438-1.063 38.938-21.063.063-3.938 2.125.063-.063 2.875.938.063L1055.5 874.958l34.583 6.042H1094v-1l68..........完整代码请登录后点击上方下载按钮下载查看

网友评论0