Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added asset/DSCF0527.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
248 changes: 0 additions & 248 deletions clock/clock.css

This file was deleted.

24 changes: 0 additions & 24 deletions clock/clock.js

This file was deleted.

Binary file removed clock/clock.png
Binary file not shown.
48 changes: 48 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

.container {
position: relative;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
overflow: hidden;
background: #000;
}

.container span {
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-width: 20px;
min-height: 20px;
}

.container span::before {
content: "";
position: absolute;
width: 100%;
height: 100%;
background: url(../asset/DSCF0527.JPG);
background-position: center;
background-size: cover;
background-attachment: fixed;
transition: 10s;
opacity: 0;
border-radius: 50%;
pointer-events: none;
}

.container span:hover::before {
width: 1500%;
height: 1500%;
transition: 0s;
opacity: 1;
}
64 changes: 14 additions & 50 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,53 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Javascript Clock UI Dark</title>
<link rel="stylesheet" href="clock/clock.css" />
</head>

<body>
<div class="clock">
<div class="hour">
<div class="hr" id="hr"></div>
</div>
<div class="min">
<div class="mn" id="mn"></div>
</div>
<div class="sec">
<div class="sc" id="sc"></div>
</div>
</div>
<!-- <div class="toggleClass" onclick="toggleClass()"></div> -->
<label class="switch">
<input type="checkbox" checked onclick="toggleClass()" />
<span class="slider round"></span>
</label>
<label class="label">
<div class="switch">
<input type="checkbox" checked onclick="toggleClass()" />
<span class="slider round"></span>
</div>
<div class="label-text"></div>
</label>
<script type="text/Javascript">
function toggleClass() {
const body = document.querySelector('body');
body.classList.toggle('light');
}

const deg = 6; const hr = document.querySelector('#hr');
const mn = document.querySelector('#mn'); const sc = document.querySelector('#sc');
setInterval(() => {
let day = new Date();
let hh = day.getHours() * 30;
let mm = day.getMinutes() * deg;
let ss = day.getSeconds() * deg;

hr.style.transform = `rotateZ(${(hh)+(mm/12)}deg)`;
mn.style.transform = `rotateZ(${mm}deg)`;
sc.style.transform = `rotateZ(${ss}deg)`;
});
</script>
</body>
<head>
<meta charset="utf-8" />
<title>Bubby background animation</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<section class="container"></section>
<script>
for (let i = 1; i <= 4000; i++) {
let box = document.createElement("span");
document.querySelector(".container").appendChild(box);
}
</script>
</body>
</html>