15 lines
439 B
JavaScript
15 lines
439 B
JavaScript
{b30cd2995b31fe4917261e7a51c3223f1c3fef95 true 439 app.js 0xc002bd7030}
const deg = 6;
|
|
const h = document.querySelector('#h');
|
|
const m = document.querySelector('#m');
|
|
const s = document.querySelector('#s');
|
|
|
|
setInterval(() => {
|
|
let day = new Date();
|
|
let hh = day.getHours() * 30;
|
|
let mm = day.getMinutes() * deg;
|
|
let ss = day.getSeconds() * deg;
|
|
|
|
h.style.transform = `rotateZ(${hh+(mm/12)}deg)`;
|
|
m.style.transform = `rotateZ(${mm}deg)`;
|
|
s.style.transform = `rotateZ(${ss}deg)`;
|
|
}); |