Reputation: 53
How can I achieve something like this using SVG?
Upvotes: 2
Views: 2682
Reputation: 72405
You would need two different circle
elements, one for the underlying gray color and the other for the blue stroke, then apply a stroke-dasharray
and stroke-dashoffset
to the blue stroke.
.track,
.filled {
stroke-width: 10;
fill: none;
}
.track {
stroke: #eee;
}
.filled {
stroke: blue;
stroke-dashoffset: 110;
stroke-dasharray: 440;
}
<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>
Upvotes: 5