您将需要两个不同的circle元素,一个用于底层灰色,另一个用于蓝色描边,然后将 和 应用于stroke-dasharray蓝色stroke-dashoffset描边。
.track,
.filled {
stroke-width: 10;
fill: none;
}
.track {
stroke: #eee;
}
.filled {
stroke: blue;
stroke-dashoffset: 110;
stroke-dasharray: 440;
}Run Code Online (Sandbox Code Playgroud)
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190 190">
<circle class="track" cx="80" cy="80" r="70" />
<circle class="filled" cx="80" cy="80" r="70" />
</svg>Run Code Online (Sandbox Code Playgroud)