22.12.2013 Views

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

W3C CSS2 Cascading Style Sheets, level 2 - instructional media + ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This property sets the background image of an element. When setting a background<br />

image, authors should also specify a background color that will be used<br />

when the image is unavailable. When the image is available, it is rendered on top<br />

of the background color. (Thus, the color is visible in the transparent parts of the<br />

image).<br />

Values for this property are either , to specify the image, or ’none’, when<br />

no image is used.<br />

Example(s):<br />

BODY { background-image: url("marble.gif") }<br />

P { background-image: none }<br />

’background-repeat’<br />

Value: repeat | repeat-x | repeat-y | no-repeat | inherit<br />

Initial: repeat<br />

Applies to: all elements<br />

Inherited: no<br />

Percentages: N/A<br />

Media: visual<br />

If a background image is specified, this property specifies whether the image is<br />

repeated (tiled), and how. All tiling covers the content [p. 81] and padding [p. 81]<br />

areas of a box. Values have the following meanings:<br />

repeat<br />

The image is repeated both horizontally and vertically.<br />

repeat-x<br />

The image is repeated horizontally only.<br />

repeat-y<br />

The image is repeated vertically only.<br />

no-repeat<br />

The image is not repeated: only one copy of the image is drawn.<br />

Example(s):<br />

BODY {<br />

background: white url("pendant.gif");<br />

background-repeat: repeat-y;<br />

background-position: center;<br />

}<br />

189

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!