File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7575 keys . forEach ( key => {
7676 key . addEventListener ( 'click' , function ( e ) {
7777 var curKey = e . currentTarget . getAttribute ( 'data-key' ) ;
78- playSoundForKey ( curKey ) ;
78+ playSoundForKey ( cujhrKey ) ;
7979 } ) ;
8080 } ) ;
8181
Original file line number Diff line number Diff line change 1414 < div class ="hand second-hand "> </ div >
1515 </ div >
1616 </ div >
17+ < div >
18+
19+ st ast </ div >
20+ < script >
21+ const secondHand = document . querySelector ( '.second-hand' ) ;
22+ const minuteHand = document . querySelector ( '.min-hand' ) ;
23+ const hourHand = document . querySelector ( '.hour-hand' ) ;
1724
25+ var transformCurrentTime = function ( ) {
26+ let currentDate = new Date ( ) ;
27+ const seconds = currentDate . getSeconds ( ) ;
28+ const minutes = currentDate . getMinutes ( ) ;
29+ const hours = currentDate . getHours ( ) - 12 ;
30+ console . log ( seconds ) ;
31+ secondHand . style . transform = "rotate(" + ( ( 6 * seconds ) + 90 ) + "deg)" ;
32+ minuteHand . style . transform = "rotate(" + ( ( 6 * minutes ) + 90 ) + "deg)" ;
33+ hourHand . style . transform = "rotate(" + ( ( 30 * hours ) + 90 ) + "deg)" ;
34+ }
35+ transformCurrentTime ( ) ;
36+ window . setInterval ( transformCurrentTime , 1000 ) ;
1837
38+ </ script >
1939 < style >
2040 html {
2141 background : # 018DED url (http://unsplash.it/1500/1000?image=881&blur=50);
6181 background : black;
6282 position : absolute;
6383 top : 50% ;
84+ transform-origin : 100% ;
85+ transform : rotate (90deg );
6486 }
6587
6688 </ style >
67-
68- < script >
69-
70-
71- </ script >
7289</ body >
7390</ html >
You can’t perform that action at this time.
0 commit comments