Positioning Text Along a Path with CSS

Michelle Barker has used CSS Motion Path to align text along a path:

The “Motion Path” name is a little misleading, as it doesn’t only relate to movement. In fact, although the specification still goes by the name “Motion Path”, the property used to define the path was changed from motion-path to offset-path. It’s easy to see why: an element can be placed anywhere along the path, with or without motion – its position (or offset-distance value) doesn’t have to be animated.

And since offset-distance also is a CSS property, it can be animated 🙂

Positioning Text Along a Path with CSS →

💡 This technique is not the same as outlined in Moving Text on a Curved Path on CSS-Tricks. That technique uses SVG as its layout engine.

Published by Bramus!

Bramus is a frontend web developer from Belgium, working as a Chrome Developer Relations Engineer at Google. From the moment he discovered view-source at the age of 14 (way back in 1997), he fell in love with the web and has been tinkering with it ever since (more …)

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.