The offset-distance property sets how far an element sits along an offset-path. 0% is the start of the path. 100% is the end.
The initial value is 0. Percentages refer to the total path length. Animate distance from 0% to 100% to travel the path. It is not inherited, and it is part of the offset shorthand.
Baseline · Widely available.
Not deprecated and not experimental. Safe in current browsers since September 2022. Internet Explorer has no support.
Lengths are absolute.80px is 80 pixels from the path start, not 80% of the path.
Path length still matters. If the path is shorter than 80px, the element sits at the end.
Prefer % for full travel. Animating 0% to 100% always covers the whole path.
Use lengths for exact stops. Handy when a marker must sit a fixed gap from the start.
Edge Cases & Pitfalls
If the element does not move, one of these is usually why.
path
No path, no travel
The initial offset-path is none. Set a path before changing distance.
static
A fixed distance only parks
One value places the element. Animate from 0% to 100% when you want continuous motion.
%
Percentages use path length
50% is half of the path, not half of the viewport. A longer path makes the same percentage travel farther.
length
Lengths can overshoot
A length larger than the path clamps to the end. Prefer percentages when you always want full-path travel.
a11y
Respect reduced motion
Looping path animations can distract. Prefer a static distance, or pause motion, when prefers-reduced-motion is reduce.
Compatibility
Browser Support
offset-distance is a browser CSS property for Motion Path. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since 2022
offset-distance
Chrome 55+, Firefox 72+, Safari 15.4+, Edge 79+, Opera 42+. Internet Explorer has no native support.
94%Modern browser support
Google Chrome55+ · Desktop & Mobile
Full support
Mozilla Firefox72+ · Desktop & Mobile
Full support
Apple Safari15.4+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera42+ · Modern versions
Full support
Samsung Internet6.2+ · Android
Full support
Internet ExplorerNo support
None
offset-distanceWidely supported
Bottom line: Safe for modern motion-path demos. Pair with offset-path and animate 0% to 100% for full travel.
Remember
Key Takeaways
Role: how far along the path the element sits.
Scale:0% start, 100% end. Initial value is 0.
Motion: animate distance; keep the path fixed.
Needs a path: set offset-path first. Not inherited.
One line:offset-distance is the progress along the path — park it with a value, or animate it to travel.
Frequently Asked Questions
It sets how far along an offset-path an element sits. 0% is the start of the path and 100% is the end.
0, which places the element at the beginning of the path.
Percentages are best for most animations because they scale with the path length. Use a length when you need an exact distance in px or another unit.
Yes. Without an offset-path, distance has nowhere to travel and nothing visible changes.
Set an offset-path, then animate offset-distance from 0% to 100% with @keyframes or a transition.
It is Baseline and widely available since September 2022: Chrome 55+, Firefox 72+, Safari 15.4+, and Edge 79+. Internet Explorer has no support. It is a browser CSS property, not a Node.js feature.