stroke-dashoffset property
Sets or retrieves a value that specifies the distance into the dash pattern to start the dash.
![]() ![]() |
Syntax
stroke-dashoffset:
<percentage>
|
<length>
| inherit
Property values
- percentage
-
An integer, followed by a % sign. The value is a percentage of the current viewport.
- length
-
A floating-point number, followed by either an absolute units designator (
cm,mm,in,pt, orpc) or a relative units designator (em,ex, orpx), that indicates the distance into the dash pattern to start the dash. (For more information about the supported length units, see CSS Length Units Reference.) Default is 0. inherit-
Indicates that the property takes the same computed value as the property for the element's parent.
CSS information
| Applies To | shapes and text content elements |
|---|---|
| Media | visual |
| Inherited | 1 |
| Initial Value | 0 |
Standards information
Remarks
As of Microsoft Edge, this presentation attribute is animatable with CSS Animations and CSS Transitions.
Values can be negative.
See also
- CSSStyleDeclaration
- currentStyle
- style
- SVGCircleElement
- SVGEllipseElement
- SVGLineElement
- SVGPathElement
- SVGPolygonElement
- SVGPolylineElement
- SVGRectElement
- SVGTextElement
- SVGTextPathElement
- SVGTSpanElement
- Reference
- stroke
- strokeDasharray
- strokeLinecap
- strokeLinejoin
- strokeMiterlimit
- strokeOpacity
- strokeWidth

