
Note, that it may not be the state of the “100%” or “to” keyframe. None: (default) element gets its initial styling when the animation is not executingįorwards: animation will apply the values set by the last keyframe executed. See the Pen Fading out and keep styling by Greg Hovanesyan ( on CodePen. See the Pen Fading out animation by Greg Hovanesyan ( on CodePen.īy using animation-fill-mode: forwards we can get the element to stay faded out by retaining the styles in the final keyframe: By default, after the animation is complete, it will jump back to its initial state. Imagine a animation that fades an element out (from opacity: 1 to opacity 0 ). This property specifies what styles are applied to the element when the animation is not playing. See the Pen angle~ by Greg Hovanesyan ( on CodePen. I tested it in Chrome 54, Opera 41, Firefox 50 and Safari 10. Say you want to rotate an element 4 times, it might be the easiest choice to write rotate(4turn). Our transform: rotate(180deg), for example, could be written as transform: rotate(0.5turn) as well. You can also use grad, rad and turn as well. We often use something like transform: rotate(180deg), but “deg” isn’t the only possible unit here. angleĪngles can be valid CSS values for some properties. See the Pen reset: all by Greg Hovanesyan ( on CodePen. Unset: changes all the properties of the element or the element’s parent to their parent value if they are inheritable or to their own value if not Inherit: changes all the properties of the element or the element’s parent to their parent value Initial: changes all the properties of the element or the element’s parent their initial value The all property resets every other property (apart from unicode-bidi and direction) properties to their initial or inherited state.
