1<! DOCTYPE html>2"en">34<meta charset="UTF-8">5<title>Document</title>6<style>7 div{8 width:200px;9 height:200px;TenBorder-radius: -%; OneBORDER:1PX Solid # the; A position:relative; - margin:5px Auto; -text-Align:center; thebox-shadow:0px 0px 20px 5px # the; - } - Div span{ -transform-Origin:bottom Center; + } - . sec{ + Position:absolute; ATop -%; atLeft -%; -margin-left:-2px; -margin-top:-80px; - height:80px; - width:4px; - background:red; inBorder-radius: -% -%0 0; - } to . min{ + Position:absolute; -Top -%; theLeft -%; *margin-left:-3px; $margin-top:-60px;Panax Notoginseng height:60px; - width:6px; theBackground: # the; +Border-radius: -% -%0 0; A } the . hou{ + Position:absolute; -Top -%; $Left -%; $margin-left:-4px; -margin-top:-40px; - height:40px; the width:8px; -Background: # the;WuyiBorder-radius: -% -%0 0; the } - . cap{ Wu Position:absolute; -Top -%; AboutLeft -%; $margin-left:-6px; -margin-top:-6px; - height:12px; - width:12px; ABackground:radial-gradient (#ccc, #999); +Border-radius: -%; the } - I b{ $ Position:absolute; the top:12px; theleft:-4px; the } the</style> -<script> inWindow.onload=function () { the varAspan=document.queryselectorall ('span'); the varObox=document.getelementbyid ('Box'); About clock (); theSetInterval (Clock, -); the the for(vari =0; I < -; i++) { + varOi=document.createelement ('I'); -Oi.style.width='6px'; the if(i%5){Bayioi.style.height='8px'; the}Else{ theOi.innerhtml='<b>'+i/5+'</b>'; -oi.children[0].style.transform='Rotate (-'+i*6+'deg)'; -oi.style.height='16px'; the } the theoi.style.position='Absolute'; theoi.style.top='0px'; -oi.style.left='100px'; theOi.style.background='#000'; theoi.style.transform='Rotate ('+i*6+'deg)'; theoi.style.transformorigin='0px 100px';94 the Obox.appendchild (OI); the } the function Clock () {98 varOdate=NewDate (); About varH=odate.gethours (); - varm=odate.getminutes ();101 vars=odate.getseconds ();102 varms=odate.getmilliseconds ();103 104aspan[2].style.transform='Rotate ('+( the* (h% A)/ A+m* -/ -)+'deg)'; theaspan[1].style.transform='Rotate ('+( the*m/ -+s*6/ -)+'deg)';106aspan[0].style.transform='Rotate ('+( the*s/ -+ms*6/ +)+'deg)';107 }108 };109</script> the111<body> the<div id="Box">113<spanclass="sec"></span> the<spanclass="min"></span> the<spanclass="Hou"></span> the<pclass="Cap"></p>117</div>118</body>119CSS3++JS Clocks