-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss-text-form.css
More file actions
59 lines (55 loc) · 1.14 KB
/
Copy pathcss-text-form.css
File metadata and controls
59 lines (55 loc) · 1.14 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
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial;
}
body{
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center ;
justify-content: center;
}
form{
width: 100%;
max-width: 350px;
}
div.single-input{
width: 100%;
margin: 30px 0;
position: relative;
}
div.single-input label{
font-size: 16px;
position: absolute;
left: 0;
bottom: 5px;
color: rgb(150,150,150);
cursor: text;
transition: 0.5s ease-in-out;
}
div.single-input input{
width: 100%;
padding: 5px;
color: rgb(150,150,150);
border: 0;
border-bottom: 2px solid rgb(200,200,200);
outline: 0;
font-size: 16px;
}
div.single-input .input:focus{
border-bottom: 2px solid cornflowerblue;
}
div.single-input .input:focus,
div.single-input .input:valid{
border-bottom: 2px solid cornflowerblue
}
div.single-input .input:focus ~ label,
div.single-input .input:valid ~ label{
transform: translateY(-24px);
font-size: 12px;
font-weight: bold;
color: cornflowerblue;
}