-
Notifications
You must be signed in to change notification settings - Fork 1
/
checkbox.css
83 lines (83 loc) · 1.5 KB
/
checkbox.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
/**
*
* @Name : CustomWebCheckbox
* @Version : 1.0
* @Programmer : Max
* @Date : 2018-11-24
* @Released under : https://github.com/BaseMax/CustomWebCheckbox/blob/master/LICENSE
* @Repository : https://github.com/BaseMax/CustomWebCheckbox
*
**/
/*
body
{
background-color: #E1FEFE;
}
*/
.checkbox_container
{
height: 30px;
line-height: 30px;
margin-top: 8px;
margin-bottom: 8px;
padding-left: 40px;
cursor: pointer;
display: block;
position: relative;
/* #Bug: Cross Browser */
user-select: none;
}
.checkbox_container .checkbox_mark
{
width: 30px;
height: 30px;
top: 0;
left: 0;
position: absolute;
background-color: #eeeeee;
/* #Bug: Cross Browser */
border-radius: 4px;
}
.checkbox_container:hover input ~ .checkbox_mark
{
background-color: #cccccc;
}
.checkbox_container input:checked ~ .checkbox_mark
{
background-color: #1DDBDE;
}
.checkbox_container input
{
position: absolute;
width: 0;
height: 0;
opacity: 0;
}
.checkbox_container .checkbox_mark:after
{
display: none;
content: "";
/*
position: absolute;
*/
position: relative;
}
.checkbox_container input:checked ~ .checkbox_mark:after
{
display: block;
}
.checkbox_container .checkbox_mark:after
{
width: 4px;
height: 10px;
top: 7px;
left: 12px;
border-style: solid;
border-color: white;
border-width: 0 3px 3px 0;
/* #Bug: Cross Browser */
/*
transform: rotate(405deg);
*/
transform: rotate(45deg);
}