Interactive online courses HTML Academy
2026-03-09 14:12 Diff

You can offset a dashed stroke using the stroke-dashoffset attribute. Take the following example:

stroke-dasharray="50"

and add stroke-dashoffset: stroke-dasharray="50" stroke-dashoffset="25"

The dashes in the stroke have moved counterclockwise by the specified amount. The stroke-dashoffset value can be negative, which will make the stroke move clockwise.

The stroke-dashoffset CSS property works similarly.