body {
background:#1e2730;
font-family:Arial;
}
svg {
width:100vmin;
margin:0 auto;
display:block;
}
circle {
fill:none;
stroke-width:3;
}
#secondsPath {
stroke-width:3;
pointer-events:none;
stroke-linecap:round;
}
#minPath {
stroke-width:3;
pointer-events:none;
stroke-linecap:round;
}
#hoursPath {
stroke-width:3;
pointer-events:none;
stroke-linecap:round;
}
text {
dominant-baseline:central;
text-anchor:middle;
font-size:5px;
fill:Linen;
}
svg text::selection {
background:none;
}
#hub {
fill:#24303a;
stroke-width:0;
}
#toggle,#reset {
cursor:pointer;
}
这个时钟是svg格式 因为是矢量图 所以放大缩小不会引起变形 svg可以用embed object 标签引入到html文件里
通过控制标签来控制svg矢量图的大小 样式可以根据自己需要调整