forked from mrlaboratory/the-best-blogger-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMode Chnager Button.html
74 lines (59 loc) · 1.17 KB
/
Mode Chnager Button.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Button Mode chnager</title>
<style>
*{
padding:0;
margin:0;
box-sizing: border-box;
}
body{
display:flex;
align-items: center;
justify-content: center;
background:#d8ebe9;
min-height: 100vh;
}
.modebtn{
}
.buttoninput[type="checkbox"]{
width:80px;
height:40px;
position: relative;
-webkit-appearance: none;
box-shadow:inset 0 0 5px rgba(0,0,0,.2);
outline:none;
transition:.5s;
cursor:pointer;
border-radius:20px;
background: #d8ebe9;
}
.buttoninput:checked[type="checkbox"]{
background:#00b3ff;
}
.buttoninput[type="checkbox"]:before{
content: '';
width: 40px;
height: 40px;
border-radius: 50%;
background: #72e613;
position: absolute;
left: 0;
transform:scale(1.1);
transition:.5s;
box-shadow: 0 2px 5px rgba(0,0,0,.2);
}
.buttoninput:checked[type="checkbox"]:before{
left: 40px;
}
</style>
</head>
<body>
<div class="modebtn">
<input class="buttoninput" type="checkbox"/>
</div>
</body>
</html>