offset-path
Introduction
The offset-path CSS property specifies the path that an element follows and determines the element's position within its parent container. The path can be a straight line, a quadratic or cubic Bézier curve, an arc, or any combination of these, along which the element will be positioned or moved.
This property is typically used in combination with offset-distance to control the element's position along the path. You can also use offset-rotate to control whether the element rotates to follow the direction of that path.
Examples
Syntax
Values
The offset-path property is specified as one of the values listed below.
""
Specifies that the element does not follow any offset path. This is the default value.
<basic-shape>
A shape whose size and position are defined by its border-box. One of:
-
inset()Defines an inset rectangle.
<length-percentage>{1, 4}Represents the top, right, bottom, and left offsets from the
border-boxthat define the edges of the inset rectangle. These arguments follow the syntax of the margin shorthand, allowing one, two, or four values.round <border-radius>Optional arguments that define the rounded corners of the inset rectangle. The corner radius follows the
<border-radius>syntax. -
circle()Defines a circle using a radius and a position.
<length-percentage>Defines the radius of the circle. It can be a
<length>or a<percentage>.<position>Moves the center of the circle. It can be a
<length>, a<percentage>, or a keyword such asleft. If omitted, the position defaults tocenter. -
ellipse()Defines an ellipse using two radii and a position.
An ellipse is similar to a circle, but it uses two radii: one for the x-axis and one for the y-axis.
<radial-size>Defines the two radii, in x-axis then y-axis order. Each radius can be a
<length>or a<percentage>.<position>Moves the center of the ellipse. It can be a
<length>, a<percentage>, or a keyword such asleft. If omitted, the position defaults tocenter.Infoellipse()is not supported on iOS. -
path()Defines a shape using an SVG path definition.
The
path()function takes an SVG path string as its argument.
Formal definition
| Initial value | "" |
| Applies to | all elements |
| Inherited | no |
| Animatable | no |
Difference from Web
- Lynx supports
path(),circle(),ellipse(), andinset(). On iOS,ellipse()is not supported. - Lynx does not support Web values such as
polygon(),ray(), andurl(). - Lynx does not support coordinate box values.
Compatibility
LCD tables only load in the browser