Skip to content

Commit c6d9b91

Browse files
Added Day 62
1 parent 15fc35d commit c6d9b91

3 files changed

Lines changed: 85 additions & 2 deletions

File tree

public/60/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Document</title>
6+
<title>Day 60/100</title>
77
</head>
88
<body>
99
<main>

public/61/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>Document</title>
6+
<title>Day 61/100</title>
77
</head>
88
<body>
99
<main>

public/62/index.html

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Day 62/100</title>
7+
</head>
8+
<body>
9+
<main>
10+
<div class="toggle" id="toggle">
11+
<div class="toggle-indicator"></div>
12+
</div>
13+
</main>
14+
15+
<style>
16+
body {
17+
margin: 0;
18+
overflow: hidden;
19+
display: flex;
20+
justify-content: center;
21+
align-items: center;
22+
-webkit-tap-highlight-color: transparent;
23+
width: 100vw;
24+
height: 100vh;
25+
background-color: #fff;
26+
}
27+
28+
.toggle {
29+
position: relative;
30+
cursor: pointer;
31+
overflow: hidden;
32+
width: 200px;
33+
height: 100px;
34+
outline: 5px solid rgba(230, 230, 230, 1);
35+
transition: all 0.5s ease-in-out;
36+
}
37+
38+
.toggle-indicator {
39+
position: absolute;
40+
top: 5px;
41+
left: 5px;
42+
width: 90px;
43+
height: 90px;
44+
outline: 5px solid rgba(0, 0, 0, 1);
45+
outline-offset: -5px;
46+
transform-origin: center right;
47+
transition: all 0.5s ease-in-out;
48+
}
49+
50+
.toggle-indicator::after {
51+
content: "";
52+
position: absolute;
53+
top: 50%;
54+
left: 0%;
55+
transform: translate(0%, -50%);
56+
width: 0%;
57+
height: 100%;
58+
background-color: rgba(0, 0, 0, 1);
59+
transition: all 0.5s ease-in-out;
60+
}
61+
62+
.toggle-on {
63+
outline-color: rgba(0, 0, 0, 1);
64+
}
65+
66+
.toggle-on .toggle-indicator {
67+
left: calc(100% - 95px);
68+
}
69+
70+
.toggle-on .toggle-indicator::after {
71+
width: 100%;
72+
}
73+
</style>
74+
75+
<script>
76+
const toggle = document.getElementById("toggle");
77+
78+
toggle.addEventListener("click", () => {
79+
toggle.classList.toggle("toggle-on");
80+
});
81+
</script>
82+
</body>
83+
</html>

0 commit comments

Comments
 (0)