What does the animation-fill-mode property do in a CSS animation?
- It specifies the animation duration.
- It defines the timing function for the animation.
- It controls the behavior of the element before and after the animation.
- It sets the animation name.
The animation-fill-mode property is used to control the behavior of the animated element before and after the animation execution. It can have values like "none," "forwards," "backwards," and "both." "None" is the default value, which means the element doesn't maintain any styles before or after the animation. "Forwards" retains the styles after the animation ends, and "backwards" maintains the styles before the animation starts. "Both" keeps the styles both before and after the animation.
Loading...
Related Quiz
- You're tasked with creating a spinner loader animation that rotates 360 degrees indefinitely. How would you define this in the @keyframes rule?
- How would you use the attr() function to get the value of a data attribute in CSS?
- You want to set a global color scheme for a website using CSS variables. Where would be the best place to define these custom properties?
- You have a style rule with a class selector that is not being applied, even though another rule with three type selectors is applied to the same element. What could be the reason based on specificity?
- To apply an ease-in-out timing function to a transition, you'd set transition-timing-function to ________.