gsap实现密码框隐藏显示密码眼睛跟随鼠标交互效果代码
代码语言:html
所属分类:表单美化
代码描述:gsap实现密码框隐藏显示密码眼睛跟随鼠标交互效果代码
代码标签: 框 隐藏 显示 密码 眼睛 跟随 鼠标 交互 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap'> <style> .password-field { --c-text: #5A5A64; --c-text-light: #A1A1B6; --c-text-selection: #09ABC3; --c-background: #fff; --c-background-selection: rgba(9, 171, 195, 0.15); --c-border: #E2E2ED; --c-border-hover: #D0D0DB; --c-border-active: #09ABC3; --c-shadow: rgba(41, 41, 86, 0.06); --c-shadow-active: rgba(9, 171, 195, 0.25); --eye-background: 0; --eye-offset: 3px; --eye-wrapper-y: 0; --eye-y: 0; --eye-x: 0; --eye-s: 1; width: 220px; position: relative; border-radius: 7px; background: var(--c-background); box-shadow: inset 0 0 0 1px var(--border, var(--c-border)), 0px 1px 3px var(--shadow, var(--c-shadow)); transition: box-shadow 0.25s; } .password-field:hover { --border: var(--c-border-hover); --eye-duration: .05s; } .password-field:focus-within { --border: var(--c-border-active); --shadow: var(--c-shadow-active); } .password-field input, .password-field button { -webkit-appearance: none; outline: none; background: none; border: none; margin: 0; } .password-field input { display: block; font-family: inherit; font-size: 16px; line-height: 21px; height: 45px; color: var(--c-text); padding: 12px 41px 12px 16px; transform: translateY(var(--y, var(--default-y, 0))) translateZ(0); opacity: var(--o, var(--default-o, 1)); pointer-events: var(--pe, var(--default-pe, auto)); transition: filter 0.35s, transform 0.4s, opacity 0.25s; } .password-field input::-moz-placeholder { color: var(--c-text-light); -moz-transition: color 0.25s; transition: color 0.25s; } .password-field input:-ms-input-placeholder { color: var(--c-text-light); -ms-transition: color 0.25s; transition: color 0.25s; } .password-field input::placeholder { color: var(--c-text-light); transition: color 0.25s; } .password-field input::-moz-selection { color: var(--c-text-selection); background: var(--c-background-selection); } .password-field input::selection { color: var(--c-text-selection); background: var(--c-background-selection); } .password-field input:focus::-moz-placeholder, .password-field input:hover::-moz-placeholder { color: var(--c-text); } .password-field input:focus:-ms-input-placeholder, .password-field input:hover:-ms-input-placeholder { color: var(--c-text); } .password-field input:focus::placeholder, .password-field input:hover::placeholder { color: var(--c-text); } .password-field input:not(.clear) { width: 100%; } .password-field in.........完整代码请登录后点击上方下载按钮下载查看
网友评论0