Which of the following property is used to define the animations that should be run?

animation-delay
animation-iteration-count
animation-duration
animation-name

The correct answer is: D. animation-name

The animation-name property is used to define the animations that should be run. It takes a string value that is the name of an animation defined in the CSS stylesheet.

The animation-delay property is used to specify a delay before the animation starts. It takes a time value in seconds.

The animation-iteration-count property is used to specify how many times the animation should be repeated. It takes an integer value.

The animation-duration property is used to specify the duration of the animation. It takes a time value in seconds.

Here is an example of how to use the animation-name property:

“`css
.my-element {
animation-name: my-animation;
}

@keyframes my-animation {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(100px, 0);
}
}
“`

In this example, the animation-name property is used to define an animation named my-animation. The @keyframes rule defines the animation, which will move the element from its original position to a position 100px to the right.

Exit mobile version