-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
74 lines (65 loc) · 1.11 KB
/
Copy pathstyle.css
File metadata and controls
74 lines (65 loc) · 1.11 KB
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
@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none;
font-family: 'Open+Sans';
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #111;
}
.container {
position: relative;
width: 500px;
padding: 40px;
background: #151515;
}
.container h2 {
color: #555;
margin-bottom: 45px;
}
.input-field {
position: relative;
height: 40px;
width: 100%;
}
.input-field input[type="text"] {
position: absolute;
background: transparent;
border: none;
box-shadow: none;
color: white;
font-size: 16px;
width: 100%;
}
.input-field label {
position: absolute;
top: 0;
left: 0;
color: #555;
pointer-events: none;
display: block;
transition: 0.5s;
}
.input-field input[type="text"]:focus + label,
.input-field input[type="text"]:valid + label {
transform: translateY(-35px);
font-size: 14px;
color: white;
background: gold;
padding: 2px 6px;
}
.input-field span {
position: absolute;
bottom: 0;
right: 0;
display: block;
background: #555;
width: 100%;
height: 2px;
}