CSS3 Transitions Exercises

Transitions allow changes to CSS properties to occur smoothly over a specified period, providing an animated effect.

Shorthand Code For Transitions

The basic 3 components of defining transitions can be declared in one line with the shorthand format (transition:property duration timing-function;), for example:

transition pattern: transition:property durationInSeconds timingFunction delay;

Transition Examples

green button yellow button

Transition Opacity

The yellow button image is absolutely positioned so that it overlaps a green button image beneath it.

Transition Several Properties

Add transtion code that will alter the width or the height of the form inputs when they are in the focus state.