输入框浮动标签特效
代码语言:html
所属分类:表单美化
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Form Fields | CSS Only Floating Label</title> <link rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/reset.min.css"> <style> html { height: 100%; } body { height: 100%; display: flex; align-items: center; background-color: #edf2f7; padding: 0 30%; } .login-form { width: 360px; padding: 0; margin: auto; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); background: white; border-radius: 8px; padding: 0; overflow: hidden; } .login-form .login-form--head { padding: 0; margin: 0; } .login-form .login-form--head img { border-radius: 8px 8px 0 0; } .login-form form { padding: 1.5rem 1.5rem 1rem; font-weight: 400; overflow: hidden; background: #fff; margin-top: 0; box-shadow: none; } .login-form .login-form--field { margin: 0 0 1rem; position: relative; } .login-form .login-form--field label { position: absolute; left: 12px; z-index: 10; display: block; cursor: default; line-height: 1; z-index: 0; color: #4a5568; transition: all 0.25s ease-out; font-size: 8px; top: 10px; transform: translateY(0%); } .login-form .login-form--field input { margin: 0; box-sizing: border-box; font-weight: 300; font-size: 16px; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0