登录注册框面错误动画提醒

代码语言:html

所属分类:表单美化

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
#login-form {
  --primary: #6D58FF;
  --primary-dark: #362A89;
  --dark: #2B3044;
  --grey-dark: #404660;
  --grey: #8A91B4;
  --grey-light: #A6ACCD;
  --light: #BBC1E1;
  --pale: #ECEFFC;
  --white: #FFFFFF;
  --red: #F04949;
  width: 100%;
  max-width: 180px;
}
#login-form .logo {
  width: 44px;
  height: 44px;
  display: block;
  margin: 0 auto;
  fill: var(--primary);
}
#login-form h1 {
  margin: 24px 0;
  font-family: inherit;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  color: var(--dark);
}
#login-form .input {
  position: relative;
}
#login-form .input label {
  pointer-events: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  position: absolute;
  top: 8px;
  left: 0;
  -webkit-transform-origin: 0 50%;
          transform-origin: 0 50%;
  -webkit-transform: translateY(var(--label-y, 0)) scale(var(--label-scale, 1)) translateZ(0);
          transform: translateY(var(--label-y, 0)) scale(var(--label-scale, 1)) translateZ(0);
  -webkit-transition: color .3s, -webkit-transform .3s;
  transition: color .3s, -webkit-transform .3s;
  transition: transform .3s, color .3s;
  transition: transform .3s, color .3s, -webkit-transform .3s;
  color: var(--label-color, var(--grey-light));
}
#login-form .input input {
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
}
#login-form .input input:not(:placeholder-shown) + label, #login-form .input input:focus + label {
  --label-y: -17px;
  --label-scale: .8;
  --label-color: var(--grey);
}
#login-form .input.email {
  margin-bottom: 16px;
}
#login-form .input.email input {
  background: none;
  outline: none;
  border: none;
  color: var(--grey-dark);
  font-weight: 500;
  font-family: inherit;
  font-size: 13px;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0