Hacker News new | ask | show | jobs
by _Microft 2290 days ago
It is animated with Javascript by updating transform:rotation every ~30ms. Couldn't the current time be set with Javascript and the animation be handled with CSS animations? Maybe CSS animations are not accurate enough time-wise so that the clock would diverge from the actual time (or other bad stuff happens like animations being suspended while a tab has no focus. I'm out of web development for too long to know off-hand how that behaves)?
1 comments

Or similarly, let SVG animation transforms do it for us:

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/ani...