Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 时钟时长_Css_Svg_Clock - Fatal编程技术网

Css 时钟时长

Css 时钟时长,css,svg,clock,Css,Svg,Clock,我一直在电码笔上玩这个钟 谁能帮我缩短时针的长度?我试过改变高度,但它似乎是从外到内牵手 所讨论的代码是: <div id="clock-container" style="padding-left:180px;"> <font color="white" size="1">&nbsp;&nbsp;&nbsp;London</font> <svg id="clock" viewBox="0 0 100 100"> &l

我一直在电码笔上玩这个钟

谁能帮我缩短时针的长度?我试过改变高度,但它似乎是从外到内牵手

所讨论的代码是:

<div id="clock-container"  style="padding-left:180px;">
<font color="white" size="1">&nbsp;&nbsp;&nbsp;London</font>
<svg id="clock" viewBox="0 0 100 100">
  <circle id="face" cx="50" cy="50" r="45"/>
  <g id="hands">
    <rect id="hour" x="47.5" y="12.5" width="5" height="40" rx="2.5" ry="2.55" />
    <rect id="min" x="48.5" y="12.5" width="3" height="40" rx="2" ry="2"/>
    <line id="sec" x1="50" y1="50" x2="50" y2="16" />
  </g>
</svg>
</div>
谢谢

只需更改高度和y轴即可。例如,对于较短的20px:

只需更改高度和y轴。例如,对于较短的20px:

<rect id="hour" x="47.5" y="32.5" width="5" height="20" rx="2.5" ry="2.55" />
x = 50 - width/2
y = 50 - height