/
button05.html
80 lines (80 loc) · 1.98 KB
/
button05.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Button 05</title>
<style>
body {
margin: 0;
padding: 0;
background: #323436;
}
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.container input[type="checkbox"] {
-webkit-appearance: none;
height: 48px;
width: 48px;
outline: none;
cursor: pointer;
background: transparent;
border-radius: 50%;
box-shadow: inset 0px 3px 3px rgba(255, 255, 255, .3),
inset 0 -3px 5px rgba(0, 0, 0, 1),
0px 3px 4px rgba(0, 0, 0, 1);
}
.container input[type="checkbox"]:checked {
box-shadow: inset 0px 3px 3px rgba(255, 255, 255, .3),
inset 0 -3px 5px rgba(0, 0, 0, .6),
inset 0 0 5px #789ceb,
0 0 3px 5px rgba(0, 0, 0, .5),
0 0 13px #2980b9,
0 0 16px #2980b9;
}
.container input[type="checkbox"]:checked ~ .power {
box-shadow: 0 0 1px 1px rgba(38, 71, 66, 0.849),
0 0 6px #b7a9fa,
0 0 9px #7f87f1;
border-left: 1px solid #7f87f1;
border-right: 1px solid #7f87f1;
border-bottom: 1px solid #7f87f1;
border-top: 1px solid transparent;
color: #b7a9fa;
}
.power {
position: absolute;
top: 58px;
left: 0px;
width: 15px;
height: 15px;
color: #000;
border: 1px solid #000;
border-top: 1px solid transparent;
border-radius: 50%;
transform: translate(19px, -40px);
z-index: -1;
}
.power::before {
content: '';
position: absolute;
top: -2px;
left: 7px;
width: 1px;
height: 8px;
background: currentColor;
}
</style>
</head>
<body>
<div class="container">
<input type="checkbox">
<div class="power"></div>
</div>
</body>
</html>