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 trialPhilip G
14,600 PointsWhy 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
Dustin Matlock
33,856 PointsPhilip, 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
Philip G
14,600 PointsPhilip G
14,600 PointsThanks, helped a lot. But unfortunately I don't see the effect of
backwards
. Can you please explain this a bit? :)Dustin Matlock
33,856 PointsDustin Matlock
33,856 PointsAt 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.Philip G
14,600 PointsPhilip G
14,600 PointsHi 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!
Dustin Matlock
33,856 PointsDustin Matlock
33,856 PointsThe part which says
rotate(-.5turn)
causes the backspin.Philip G
14,600 PointsPhilip G
14,600 PointsThanks, I get it now