-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathcheckAnimation.css
99 lines (93 loc) · 1.92 KB
/
checkAnimation.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.inputGroup{
background:#fff;
display:block;
margin:10px 0px;
position:relative
}
label{
padding:12px 30px;
width:100%;
display:block;
text-align:center;
color:#3c454c;
cursor:pointer;
position:relative;
z-index:2;
transition: color .2s ease-in;
overflow:hidden;
}
label::before{
content:"";
width:10px;
height:10px;
border-radius:50%;
position:absolute;
background:#5562eb;
top:50%;
left:50%;
transform:translate(-50%,-50%) scale3d(1,1,1);
transition:all .3s cubic-bezier(.4,0,.2,1);
opacity:0;
z-index:-1;
}
label::after{
content:"";
width:32px;
height:32px;
border:2px solid #d1d7dc;
background-color:#fff;
background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.414 11L4 12.414l5.414 5.414L20.828 6.414 19.414 5l-10 10z' fill='%23fff' fill-rule='nonzero'/%3E%3C/svg%3E ");
background-repeat:no-repeat;
background-position:2px 3px;
border-radius:50%;
z-index:2;
position:absolute;
right:30px;
top:50%;
transform:translateY(-50%);
cursor:pointer;
transition:all .2s ease-in;
}
input:checked ~ label{
color:#fff;
}
input:checked ~ label::before{
transform:translate(-50%,-50%) scale3d(56,56,1);
opacity:1;
}
input:checked ~ label::after{
background-color:#54e0c7;
border-color:#53e0c7;
}
input{
width:32px;
height:32px;
order:1;
z-index:2;
position:absolute;
right:30px;
top:50%;
transform:translateY(-50%);
cursor:pointer;
visibility:hidden
}
.form{
padding:0 16px;
max-width:550px;
margin:50px auto;
font-size:18px;
font-weight:600;
line-height:36px;
}
body {
background-color: #D1D7DC;
font-family: 'Fira Sans', sans-serif;
}
*,
*::before,
*::after{
box-sizing:inherit;
}
html{
box-sizing:border-box;
}