Welcome visitors with a message that fades in for effect

In this recipe, you will learn how to fade in a block of text using color. Often, using a fade-in of a block of color will help users to orient themselves to what portion of the page is asking for attention.

Getting ready

Choose some text that needs to appear, perhaps an error message. Also, have a color palette in mind so that the design factor will not slow down the coding effort.

How to do it...

We begin with a recipe quite similar to the pop-up error injection recipe in Chapter 3, And on the 8th Day: Creating HTML Elements. The twist is that we fade in the error gently to increase the professionalism of the user interface. Note that we do not need the MooTools MORE in this recipe, though ...

Get MooTools 1.3 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.