HTML and CSS Reference
Every different gradient you want
to use means an extra download
from the server, increasing page-
load times for users and your
If the element color will change in
response to user interaction—for
example, a menu item on mouse-
over—you need to make twice as
many images, doubling all the
problems just mentioned.
* IE has been able to do simple gradients
with the nonstandard filter attribute
since version 5.5.
CSS gradients are allowed anywhere you currently can specify
an image. At this time, browsers only have support for using
them as backgrounds, so the examples concentrate on that.
In this section you'll use a snippet of HTML like this:
You'll also need some basic CSS like this:
outline: 1px solid #999;
The CSS snippets shown next should be inserted in place of the back-
ground: none; property to achieve the screenshots shown in a support-
ing browser. See the section “Browser support” for details of prefixes
required to access experimental support.