Code snippets are below. Also you can find the repo here,
and demo is here.
The hand class property
hour, minute and second.
I realised there are many interesting CSS properties:
first we update the CSS styles for elements which have a class of .hand by adding the above properties. We then select the corresponding
div elements using the selector (i.e. .second-hand) representing the second, minute and hour hands.
The setDate function does the following:
We create a new instance of the Date class and get the current time, and degrees by which our hands should transform.
Then we add the transformation to the corresponding div elements which represent the hands.
Finally we use setInterval to call the setDate function every 1 second.