property
Stroke dashoffset — CSS reference
Shifts the starting position within the dash pattern. Positive offsets advance into the pattern; negative offsets shift in the opposite direction. The 10-unit offset shortens the first visible 20-unit dash to ten units.
Formal Syntax & Structure
css syntaxcss
stroke-dashoffset: 10px;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>stroke-dashoffset</title><style>body{margin:0;background:white}svg{display:block}#a{stroke-dashoffset:10px}#a{stroke-dasharray:20px 10px}</style><body><svg xmlns="http://www.w3.org/2000/svg" width="240" height="160" viewBox="0 0 240 160" role="img" aria-label="SVG styling example"><path id="a" d="M40 80 H180" fill="none" stroke="red" stroke-width="10"/></svg></body></html>