Which of the following applies an animation named 'grayscaleFilter' over 10 seconds to every img tag?

Study for the CodeHS Web Design (Picasso) Test. Prepare with flashcards and interactive multiple choice questions, each question supported by hints and explanations. Ace your exam!

The correct choice applies an animation named 'grayscaleFilter' to every img tag over a duration of 10 seconds. In CSS, the animation property is used to define animations that can transition between different states or styles over a specified duration. The syntax for the animation property includes the name of the animation followed by its duration. Here, 'grayscaleFilter' is the name of the animation being applied, and specifying it as '10s' indicates that the animation should take ten seconds to complete, creating a slow and smooth effect on the images.

In contrast, other options use different properties. The first choice specifies a duration of 10 milliseconds, which is very brief and not suitable for noticeable animations. The third and fourth options use the transition property instead of animation. Transitions are used to provide gradual changes between CSS property values rather than to create keyframe-based animations like the one intended with 'grayscaleFilter'. As a result, they do not produce the same effect on the img tags as animations do. Thus, the correct method to apply the desired animation is to use the animation property with the duration set to 10 seconds.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy