サンドボックス本体{背景色:#000; } .box {width: 50px; height: 50px; border: 1px solid white} .highlight {background-color: yellow;} var dthen = new Date(); $( '<div id = "past">')。css({'height':(dthen.getMinutes()* 60))dthen.getSeconds() 'px'、 'position': 'absolute'、 'width' : '200px'、 'top': '0px'、 '背景色': 'グレー'、 '不透明度': '0.5'}).appendTo( "#container"); setInterval(function(){dNow = new Date(); $( '#past')。css( 'height'、((dNow.getSeconds()(dNow.getMilliseconds()/ 1000))* 50)%300 ' px ');}、10) $( "。box")。クリック(function(){$(this).toggleClass( "highlight");});