首先先创建一个静态的CSS样式 做一个时钟的样子
<style>
.clock {
height: 600px;
width: 600px;
border-radius: 50%;
border: 3px solid black;
position: relative;
}
.num {
position: absolute;
font-size: 32px;
top: 50%;
left: 50%;
/* transform: translateY(-270px) translate(-50%, -50%); */
}
.scale {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: 10px;
width: 1px;
background: black;
}
.scale.long {
height: 16px;
}
.hourHand,
.minuteHand,
.secondHand {
position: absolute;
background: black;
top: 50%;
left: 50%;
transform-origin: center bottom;
}
/* 指针 */
.