Animating clip-path Shapes
Create dramatic reveal animations by transitioning between clip-path polygon values.
Animatable clip-path
CSS can transition and animate between two clip-path values as long as both are the same shape function with the same number of arguments. Interpolation is point by point.
Slide Reveal Animation
A classic clip-path reveal — content slides in from left:
.content {
clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
transition: clip-path 700ms cubic-bezier(0.4, 0, 0.2, 1);
}
.content.visible {
clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}All lessons in this course
- clip-path with polygon() and circle()
- shape-outside for Text Wrapping
- Animating clip-path Shapes
- CSS Masks vs Clip-path