PrepAway - Latest Free Exam Questions & Answers

You are developing a web application by using HTML5.

You are developing a web application by using HTML5.

You have the following requirements.

The color of a menu item must change when a user hovers over the item.

The color of the menu item must change back to its original color after five seconds.

You need to ensure that the animation is applied to all menu items.

Which CSS3 code should you use?



A. Option A

B. Option B

C. Option C

D. Option D

Explanation:

transition-property

The transition-property property specifies the name of the CSS property the transition effect is for (the transition effect will start when the specified CSS property changes).

Tip: A transition effect could typically occur when a user hover over an element.

Note: Always specify the transition-duration property, otherwise the duration is 0, and the transition will have no effect.

CSS3 transition-property Property

2 Comments on “You are developing a web application by using HTML5.

    1. _mr says:

      Well it all depends what ‘color of a menu item’ means. You understood it as background-color and my first impression was the opposite so the text color. In CSS when saying color you usually mean foreground color so basically text color. I am not sure what is the correct answer for menuitem elements. They are deprecated and do not work at all in many browsers. I did similar example using paragraphs and both C & D seem to work fine (for text color). I would bet C if I have to.




      0



      0

Leave a Reply