Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fe83039 + 9747220 commit ad4a950Copy full SHA for ad4a950
02 - JS + CSS Clock/index-FINISHED.html
@@ -81,11 +81,11 @@
81
secondHand.style.transform = `rotate(${secondsDegrees}deg)`;
82
83
const mins = now.getMinutes();
84
- const minsDegrees = ((mins / 60) * 360) + 90;
+ const minsDegrees = ((mins / 60) * 360) + ((seconds/60)*6) + 90;
85
minsHand.style.transform = `rotate(${minsDegrees}deg)`;
86
87
const hour = now.getHours();
88
- const hourDegrees = ((hour / 12) * 360) + 90;
+ const hourDegrees = ((hour / 12) * 360) + ((mins/60)*30) + 90;
89
hourHand.style.transform = `rotate(${hourDegrees}deg)`;
90
}
91
0 commit comments