-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcheckbox.css
More file actions
126 lines (99 loc) · 2.35 KB
/
checkbox.css
File metadata and controls
126 lines (99 loc) · 2.35 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.radiocontainer {
display: block;
position: relative;
padding-left: 35px !important;
margin-bottom: 12px !important;
cursor: pointer;
font-size: 22px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Hide the browser's default checkbox */
.radiocontainer input {
position: absolute;
opacity: 0;
cursor: pointer;
}
/* Create a custom checkbox */
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 17px;
width: 17px;
background-color: #eee;
border-radius: 4px;
}
/* On mouse-over, add a grey background color */
.radiocontainer:hover input~.checkmark {
background-color: #ccc;
}
/* When the checkbox is checked, add a blue background */
.radiocontainer input:checked~.checkmark {
background-color: #7F17AF;
}
/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
content: "";
position: absolute;
display: none;
}
/* Show the checkmark when checked */
.radiocontainer input:checked~.checkmark:after {
display: block;
}
/* Style the checkmark/indicator */
.radiocontainer .checkmark:after {
left: 4.5px;
top: 1.5px;
width: 4px;
height: 7px;
border: solid white;
border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
/* Create a custom radio button */
.radiomark {
position: absolute;
top: 0;
left: 0;
height: 17px;
width: 17px;
background-color: #eee;
border-radius: 50%;
}
/* On mouse-over, add a grey background color */
.radiocontainer:hover input~.radiomark {
background-color: #ccc;
}
/* When the radio button is checked, add a blue background */
.radiocontainer input:checked~.radiomark {
background-color: #7F17AF;
}
/* Create the indicator (the dot/circle - hidden when not checked) */
.radiomark:after {
content: "";
position: absolute;
display: none;
}
/* Show the indicator (dot/circle) when checked */
.radiocontainer input:checked~.radiomark:after {
display: block;
}
/* Style the indicator (dot/circle) */
.radiocontainer .radiomark:after {
top: 5px;
left: 5px;
width: 7px;
height: 7px;
border-radius: 50%;
background: white;
}
.radiocontainer input {
width: 0% !important;
height: 0% !important;
}