Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Unused CSS Stages CSS Animations Full-Page Animation Project: Part 2

Why do we need animation-fill-mode?

Why do we need animation-fill-mode and what does it effect in the animation? I'm so confused.

Thanks in advance!

1 Answer

Philip, I think Guil explained it a bit, but see if this explanation helps out, and of course Keyframe Animation Syntax.

The animation-fill-mode CSS property specifies how a CSS animation should apply styles to its target before and after it is executing. β€”Mozilla Developer Network

This CSS property sets the state of the end animation when the animation is not running. β€”David Walsh

Thanks, helped a lot. But unfortunately I don't see the effect of backwards. Can you please explain this a bit? :)

At about 07:20 in this video, you can see how backwards affects the animation. If you're not getting that, you can post your code here, and I'll take a look for you.

Hi Dustin, this confuses me: http://codepen.io/valhead/pen/01d947ae82369a39bb626a23b8a5311a

http://www.valhead.com/2013/01/04/tutorial-css-animation-fill-mode/

I don't get, why it flips back at the beginning. Thanks for your kind support!

The part which says rotate(-.5turn) causes the backspin.

Thanks, I get it now