登录注册框面错误动画提醒
代码语言: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; letter-spacing: .025em; line-height: 22px; caret-color: var(--primary); padding: 7px 0 5px 0; box-shadow: inset 0 -1px 0 0 var(--grey); } #login-form .input.password { height: 34px; } #login-form .input.password .dots { position: absolute; display: -webkit-box; display: flex; left: 0; top: 50%; -webkit-transform: translateY(-2px); transform: translateY(-2px); } #login-form .input.password .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--grey-dark); display: block; margin-right: 4px; -webkit-animation: var(--name, scale-in) 0.05s linear forwards; animation: var(--name, scale-in) 0.05s linear forwards; } #login-form .input.password .dots i.remove { --name: scale-out; } #login-form .input.password .dots i:nth-child(1) { --delay: 393.5ms; } #login-form .input.password .dots i:nth-child(2) { --delay: 387ms; } #login-form .input.password .dots i:nth-child(3) { --delay: 380.5ms; } #login-form .input.password .dots i:nth-child(4) { --delay: 374ms; } #login-form .input.password .dots i:nth-child(5) { --delay: 367.5ms; } #login-form .input.password .dots i:nth-child(6) { --delay: 361ms; } #login-form .input.password .dots i:nth-child(.........完整代码请登录后点击上方下载按钮下载查看
网友评论0