Fix typos
This commit is contained in:
parent
d34aaec76e
commit
11797f5f06
2 changed files with 5 additions and 5 deletions
6
main.css
6
main.css
|
@ -20,8 +20,6 @@ body {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 50%;
|
bottom: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
border-top-left-radius: 50%;
|
|
||||||
border-top-right-radius: 50%;
|
|
||||||
transform-origin: bottom;
|
transform-origin: bottom;
|
||||||
transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
|
transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
|
||||||
}
|
}
|
||||||
|
@ -34,7 +32,7 @@ body {
|
||||||
|
|
||||||
.clock .hands.min {
|
.clock .hands.min {
|
||||||
width: 4px;
|
width: 4px;
|
||||||
height: 35%;
|
height: 37%;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,6 +40,8 @@ body {
|
||||||
width: 2px;
|
width: 2px;
|
||||||
height: 42%;
|
height: 42%;
|
||||||
background-color: #ff0000;
|
background-color: #ff0000;
|
||||||
|
border-top-left-radius: 40%;
|
||||||
|
border-top-right-radius: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clock .dot {
|
.clock .dot {
|
||||||
|
|
4
main.js
4
main.js
|
@ -5,9 +5,9 @@ function setClock() {
|
||||||
|
|
||||||
const secRatio = currentDate.getSeconds() / 60;
|
const secRatio = currentDate.getSeconds() / 60;
|
||||||
const minRatio = (secRatio + currentDate.getMinutes()) / 60;
|
const minRatio = (secRatio + currentDate.getMinutes()) / 60;
|
||||||
const horRatio = (minRatio + currentDate.getHours()) / 12;
|
const hrsRatio = (minRatio + currentDate.getHours()) / 12;
|
||||||
|
|
||||||
document.getElementById('sek').style.setProperty('--rotation', secRatio * 360);
|
document.getElementById('sek').style.setProperty('--rotation', secRatio * 360);
|
||||||
document.getElementById('min').style.setProperty('--rotation', minRatio * 360);
|
document.getElementById('min').style.setProperty('--rotation', minRatio * 360);
|
||||||
document.getElementById('hrs').style.setProperty('--rotation', horRatio * 360);
|
document.getElementById('hrs').style.setProperty('--rotation', hrsRatio * 360);
|
||||||
}
|
}
|
Loading…
Reference in a new issue