-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.css
executable file
·86 lines (74 loc) · 1.34 KB
/
form.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
.form__group {
position: relative;
padding: 15px 0 0;
margin: 0 auto;
margin-bottom: 30px;
width: 50%;
}
@media screen and (max-width: 600px) {
.form__group {
width: 80%;
}
}
.form__field {
font-family: inherit;
width: 100%;
border: 0;
border-bottom: 2px solid #9b9b9b;
outline: 0;
font-size: 1.3rem;
color: #000000;
padding: 7px 0;
background: transparent;
transition: border-color 0.2s;
}
.form__field::placeholder {
color: transparent;
}
.form__field:placeholder-shown~.form__label {
font-size: 1.3rem;
cursor: text;
top: 20px;
}
.form__label {
position: absolute;
top: 0;
display: block;
transition: 0.2s;
font-size: 2sp;
color: #9b9b9b;
font-family: "Avenir Next", "Avenir", sans-serif;
}
.form__field:focus {
padding-bottom: 6px;
border-width: 3px;
border-image: linear-gradient(to right, #a08a4f, #a08a4f);
border-image-slice: 1;
}
.form__field:focus~.form__label {
position: absolute;
top: 0;
display: block;
transition: 0.2s;
font-size: 1rem;
color: #a08a4f;
font-weight: 700;
}
/* reset input */
.form__field:required, .form__field:invalid {
box-shadow: none;
}
.invalid {
color: red;
visibility: hidden;
}
.submit_message {
height: 30px;
width: 600px;
visibility: hidden;
}
@media screen and (max-width: 600px) {
.submit_message {
width: 300px;
}
}