-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.css
72 lines (64 loc) · 1017 Bytes
/
test.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
*,
:before,
:after {
box-sizing: border-box;
}
.group {
position: relative;
margin: 45px 0;
}
textarea {
resize: none;
}
input,
textarea {
background: none;
color: #c6c6c6;
font-size: 18px;
padding: 10px 10px 10px 5px;
display: block;
width: 320px;
border: none;
border-radius: 0;
border-bottom: 1px solid #c6c6c6;
}
input:focus,
textarea:focus {
outline: none;
}
input:focus ~ label, input:valid ~ label,
textarea:focus ~ label,
textarea:valid ~ label {
top: -14px;
font-size: 12px;
color: #2196F3;
}
input:focus ~ .bar:before,
textarea:focus ~ .bar:before {
width: 320px;
}
label {
color: #c6c6c6;
font-size: 16px;
font-weight: normal;
position: absolute;
pointer-events: none;
left: 5px;
top: 10px;
transition: 300ms ease all;
}
.bar {
position: relative;
display: block;
width: 320px;
}
.bar:before {
content: "";
height: 2px;
width: 0;
bottom: 0px;
position: absolute;
background: #2196F3;
transition: 300ms ease all;
left: 0%;
}