CSS animationfillmode Property (original) (raw)

CSS animation-fill-mode Property

Last Updated : 23 Aug, 2024

The animation-fill-mode property in CSS is used to define the styles that an animation applies to an element before and after it executes. By default, CSS animations do not affect an element until the first keyframe is played or after the last keyframe is played.

This property can override that behavior, allowing for more control over the animation's impact.

**Syntax

animation-fill-mode: none | forwards | backwards | both | initial | inherit;

**Property Value

The animation-fill-mode property contains many values which are listed below:

**Example: In this example, we are using the above-explained property.

html `

CSS | animation-fill-mode Property