Challenge 2, Clock

The goal is to make a nice looking clock. :clock1:

Nothing to add about that challenge, expected to learn something more that just how to make a radius transform each second. Exercice is pretty much to design the hands properly and fix the 0’s bug.

Minor stuff I learned

var date = new Date()
var hours = date.getHours()
  • code to get the current hour

transform-origin: 100%; was used to center the hand of the clock in the midddle


Some ideas to add to the project

  • make the whole project from scratch (easier positionning for the hands…)
  • resolve the tricky issue of the transition when a hand hits 0 hours/minutes/seconds
  • worth it ? not really.