-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.css
76 lines (59 loc) · 1.45 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
/*
* Based on tutorial at: http://www.hongkiat.com/blog/css3-checkbox-radio/
*/
label {
cursor: pointer;
/*Make room for the checkbox*/
padding-left: 2em;
font-size: 15px;
/*We want to display our custom check boxes right next to the labels*/
position: relative;
display: inline-block;
/*Do not allow the label text to be selected*/
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/*Hide the browsers default */
input[type=radio],
input[type=checkbox] {
display: none;
}
label:before {
/*By default our boxes will be empty (no dot or check)*/
content: "";
text-align: center;
/*We want to display our custom check boxes right next to the labels*/
display: inline-block;
position: absolute;
left: 0;
bottom: 2px;
/*Our boxes are about the size of one M*/
width: 1em;
height: 1em;
transition: background-color 0.3s ease;
background-color: #7fb0cd;
border: 2px solid #25205e;
border-radius: 3px;
color: white;
line-height: 1em;
text-shadow: 1px 1px 1px #25205e;
}
input + label:hover:before {
background-color: #b2d0e1;
}
/*Radio buttons are round.*/
input[type=radio] + label:before {
border-radius: 1em;
}
input[type=radio]:checked + label:before {
/*The unicode for the medium dot character*/
content: "\26AB";
}
input[type=checkbox]:checked + label:before {
/*The unicode for the check character*/
content: "\2713";
}