-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathyes-no.css
82 lines (75 loc) · 1.25 KB
/
yes-no.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
body{
margin: 0;
padding: 0;
background: #f3f3f3;
font-family: sans-serif;
}
.btn{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100px;
height: 40px;
}
.btn input{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
cursor: pointer;
opacity: 0;
z-index: 1;
}
.btn div{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 4px solid #000;
border-radius: 4px;
box-shadow: 0 10px 20px rgba(0, 0, 0, .5);
box-sizing: border-box;
overflow: hidden;
}
.btn div .slide{
position: absolute;
top: -12%;
left: -10%;
width: 40px;
height: 40px;
background: #000;
transition: .5s;
}
.btn input:checked + div .slide{
transform: translateX(75px);
}
.btn div .slide:before{
content: 'YES';
position: absolute;
top: 7%;
left: -70px;
text-align: center;
width: 73px;
height: 85%;
line-height: 35px;
background-color: #7CFC00;
font-weight: bold;
color: #fff;
}
.btn div .slide:after{
content: 'NO';
position: absolute;
top: 7%;
left: 40px;
text-align: center;
width: 75px;
height: 85%;
line-height: 35px;
background-color: #FF0000;
font-weight: bold;
color: #fff;
}