The offset-path property defines the route an element follows during a motion path animation. It is the foundation for circle orbits, SVG curves, and custom shape-based movement.
01
Motion Route
Defines the path.
02
Syntax
Shapes and SVG paths.
03
circle()
Easy orbit paths.
04
path()
Custom SVG routes.
05
none Default
No path applied.
06
With distance
Pair with offset-distance.
Fundamentals
Introduction
The offset-path property in CSS is used to define the path along which an element moves during an animation.
This path can be a basic shape, such as a circle or rectangle, or a more complex path defined using SVG path data.
The offset-path property is often used in conjunction with other properties like offset-distance and offset-rotate to create sophisticated motion effects.
Definition and Usage
Think of offset-path as drawing the track. Once the track exists, you can move an element along it by changing offset-distance.
Beginners usually start with circle() because it creates smooth orbital motion with very little code.
💡
Beginner Tip
Define offset-path first, then animate offset-distance from 0% to 100%.
Foundation
📝 Syntax
The syntax for the offset-path property is as follows:
syntax.css
element{offset-path:value;}
The value can be a basic shape, an SVG path, or the keyword none.
Basic Example
offset-path.css
.box{offset-path:circle(100px at 150px 150px);animation:move 5s linear infinite;}
Syntax Rules
Use none to remove a motion path.
Use shape functions such as circle(), ellipse(), and polygon().
Use path() for custom SVG-style routes.
Combine with offset-distance to move along the defined route.
Defaults
🎯 Default Value
The default value of the offset-path property is none, meaning that no path is defined for the element to follow.
Without a path, related motion properties such as offset-distance have no visible effect.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
none
Applies to
All elements, but motion is visible with positioned or transformed elements
Inherited
No
Animatable
No
Common use
Orbits, curved routes, and decorative motion path animations
Reference
💎 Property Values
Value
Example
Description
none
offset-path: none;
The element does not follow any path
path()
path("M 10 80 C 40 10, 65 10, 95 80")
Defines a path using SVG path data
circle()
circle(50% at 50% 50%)
Defines a circular path
ellipse()
ellipse(50% 25% at 50% 50%)
Defines an elliptical path
polygon()
polygon(50% 0%, 100% 100%, 0% 100%)
Defines a polygonal path
url()
url("route.svg#path1")
References an external SVG path resource
circle()
Best for simple orbit animations around a center point.
path()
Best for custom curves, borders, and complex routes.
ellipse()
Useful for oval-shaped motion around a focal point.
polygon()
Creates motion along triangle, diamond, or custom polygon edges.
Keep motion decorative — Do not rely on path movement to communicate essential information.
Avoid distracting loops — Continuous motion can make nearby content harder to read.
Provide static fallbacks — Ensure the layout remains usable if motion paths are unsupported.
🧠 How offset-path Works
1
You define the route
Choose a shape function or SVG path() with offset-path.
Path
2
You move along the route
Animate or set offset-distance to control progress on the path.
Distance
3
You refine alignment
Use offset-anchor and offset-rotate when needed for better visual results.
Refinement
=
🛣
Custom motion paths
Elements follow circles, curves, and polygons without manual coordinate math.
Compatibility
Browser Compatibility
The offset-path property is supported in most modern browsers, including current versions of Chrome, Firefox, Safari, Edge, and Opera. Test your animations across browsers to ensure consistent behavior.
✓ Baseline · Modern browsers
Reliable support for motion paths
Shape-based and SVG-style paths work well in up-to-date browser versions.
90%Modern browser support
Google Chrome46+ · Desktop & Mobile
Full support
Mozilla Firefox72+ · Desktop & Mobile
Full support
Apple Safari15.4+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera33+ · Modern versions
Full support
Fallback behavior
When unsupported, the element remains in normal layout instead of following the defined path.
💻
Internet ExplorerNo support · Use transform-based animation fallbacks
None
offset-path property90% supported
Bottom line: Use offset-path for modern decorative motion, with reduced-motion and fallback plans in place.
Wrap Up
Conclusion
The offset-path property provides a powerful way to animate elements along predefined paths.
By leveraging various path definitions, such as circles, ellipses, and SVG paths, you can create dynamic and engaging animations. Experiment with different paths and combine offset-path with other properties like offset-distance and offset-rotate to achieve the desired motion effects for your web projects.