HTML Cookbook

Recipes for tasty webpages from
banner that links to html help gnubee, a WebTV newsgroup




Understanding Gradangles


As we've mentioned, when you are working with gradcolors, the color changes from the bgcolor to the gradcolor in a direction set by (in the direction of) the gradangle. The gradangle is entered in degrees, which can be positive or negative, from -360° to (+) 360°.

You would think that the gradangles correspond to the degrees of a compass, with 0° being "north" or "up", but this is not the case.

Instead, they work along an upside-down compass with the degrees increasing counter-clockwise. See the following illustration.

gradcircle.gif

Let's look at some examples using bgcolor="#000000" (black) & gradcolor="#0000ff" (blue). The color changes from the bgcolor to the gradcolor.

First we'll go down.
Gradangle="0°.
Now right.
Gradangle="90°.
Then up.
Gradangle="180°.
And left.
Gradangle="270°.



Other angles

"Southeast"
Upper left to lower right
Gradangle="45°.
"Southwest"
Upper right to lower left
Gradangle="315°.
"Northeast"
Lower left to upper right
Gradangle="135°.
"Northwest"
Lower right to upper left
Gradangle="225°.
Intro To Gradcolors
Vertical Gradcolors
Horizontal Gradcolors

Main Index
More Mallrats Tutorials