HTML and CSS Reference
In-Depth Information
In this example, the background color would be green. However, if the
bottom-most background image cannot be used, then blue would be shown
instead of green. If you do not specify a color before the slash, then it is
assumed to be transparent.
CHANGES TO BACKGROUND REPEAT
When an image is repeated in CSS 2, it is often cut o
"
at the end of the
element. CSS 3 introduces two new properties to fix this:
•
space
: an equal amount of space is applied between the image tiles
until they fill the element.
•
round
: the image is scaled down until the tiles fit the element.
An example of
background-repeat: space;
is available on the CSS 3
specifications website.
CHANGES TO BACKGROUND ATTACHMENT
The
background-attachment
has a new possible value:
local.
This
comes into play with elements that can scroll (i.e. are set to
overflow:
scroll;
). When
background-attachment
is set to
scroll,
the
background image will not scroll when the element's content is scrolled.
With
background-attachment:local
now, the background scrolls
when the element's content is scrolled.