js+css实现表单验证动画交互效果代码
代码语言:html
所属分类:验证
代码描述:js+css实现表单验证动画交互效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet">
<style>
:root {
--primary: #4361ee;
--primary-light: #4895ef;
--danger: #f72585;
--success: #4cc9f0;
--dark: #2b2d42;
--light: #f8f9fa;
--gray: #adb5bd;
--border-radius: 12px;
--shadow: 0 10px 20px rgba(0,0,0,0.1);
--transition: all .3s cubic-bezier(0.25,0.8,0.25,1)
}
* {
box-sizing: border-box;
margin: 0;
padding: 0
}
body {
font-family: 'Poppins',sans-serif;
background: linear-gradient(135deg,#f5f7fa 0,#c3cfe2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
color: var(--dark);
line-height: 1.6
}
.container {
max-width: 800px;
width: 100%;
background: white;
border-radius: var(--border-radius);
box-shadow: var(--shadow);
overflow: hidden;
display: flex
}
.form-container {
padding: 40px;
flex: 1
}
.illustration {
flex: 1;
background: linear-gradient(135deg,var(--primary) 0,var(--primary-light) 100%);
display: flex;
justify-content: center;
align-items: center;
padding: 40px
}
.illustration img {
max-width: 100%;
height: auto;
filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2))
}
h1 {
font-size: 2.2rem;
margin-bottom: 10px;
color: var(--primary);
font-weight: 600
}
.subtitle {
color: var(--gray);
margin-bottom: 30px;
font-weight: 300
}
.form-group {
margin-bottom: 25px;
position: relativ.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0