您将需要两个不同的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)
归档时间: |
|
查看次数: |
2424 次 |
最近记录: |