[thelist] DOM compliant Color Fades

Timothy Martens timfm at hawaii.rr.com
Wed Mar 27 16:35:01 CST 2002

This fades an element from black to white or white to black...

var clr=255;		// initial value

function fadeIt() {
if(clr>0) {			// if not yet black
	clr-=5;		// increments to black

	clr=255;		// reset value

How could I break out the "var clr" it's R G B components so as to be
able to actually fade COLORS?

working model at...


<tip title="Practical HTML text styling" author="Timothy Martens">
Todd Fahrner gives "production grade advice" on using CSS in conjunction
with <small> and <big> tags to keep your text styling accessible:

More information about the thelist mailing list