Code has been added to clipboard!

The CSS Offset Property

Reading time 1 min
Published Aug 8, 2017
Updated Jan 6, 2020

CSS offset property

The CSS offset property allows you animate an element by defining a specific path. It is an experimental property, so always check the browser support info.

CSS offset is a shorthand for five subproperties:

  • offset-anchor
  • offset-distance
  • offset-path
  • offset-position
  • offset-rotate

All of them can also be used individually. However, the subproperties are experimental as well.

Udacity
Pros
  • Simplistic design (no unnecessary information)
  • High-quality courses (even the free ones)
  • Variety of features
Main Features
  • Nanodegree programs
  • Suitable for enterprises
  • Paid certificates of completion
Coursera
Pros
  • Professional service
  • Flexible timetables
  • A variety of features to choose from
Main Features
  • Professional certificates of completion
  • University-level courses
  • Multiple Online degree programs
Datacamp
Pros
  • Great user experience
  • Offers quality content
  • Very transparent with their pricing
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable

Syntax and property values

As all shorthands in CSS, offset requires you to list the values for each subproperty in a row:

offset: path distance rotate anchor;

The subproperties and their values are explained in the table below.

Subproperty Default value Definition
offset-anchor auto Defines the point traveling along the path in keywords, length units, percentages or edge offset values
offset-distance 0 Defines the element's position in the path in percentages
offset-path none Defines the motion path in SVG coordinates
offset‑position auto The initial position of the element
offset-rotate auto Defines the element's orientation in the path in angles

Note: in its early versions, the offset CSS property was also called motion.

Browser support

Browser image
Chrome
55+
Browser image
Edge
-
Browser image
Firefox
-
Browser image
IE
-
Browser image
Opera
42+
Browser image
Safari
-

Mobile browser support

Browser image
Chrome
55+
Browser image
Firefox
-
Browser image
Opera
-
Browser image
Safari
-

Latest Udacity Coupon Found:

Verified STAFF PICK

75% OFF COURSES

Udacity Black Friday Offer

The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!

Expiration date: 25/01/2021
3176 People Used
Only 97 Left
Rating
5.0