HTML and CSS Reference
In-Depth Information
A good explanation of the di
"
erences between
background-clip
and
background-origin
is available on CSS3.info.
NEW PROPERTY: BACKGROUND SIZE
The
background-size
property is used to resize your background image.
There are a number of possible values:
•
background-size: contain;
scales down image to fit element (maintaining pixel aspect ratio).
•
background-size: cover;
expands image to fill element (maintaining pixel aspect ratio).
•
background-size: 100px 100px;
scales image to the sizes indicated.
•
background-size: 50% 100%;
scales image to the sizes indicated. Percentages are relative to the size
of containing element.
You can read up on some examples of special cases on the CSS 3
specifications website.