This page tests the various declarations of the CSS3 Backgrounds and Borders module.
This is the example element we're going to use throughout this page:
It has the following styles; the relevant background-* will be added inline:
div.test {
background-image: url(/pix/logo_quirksmode.gif);
border: 5px solid #6374AB;
padding: 10px;
width: 200px;
height: 200px;
}
The image repeats unchecked.
The image repeats only horizontally.
The image repeats only vertically.
The image does not repeat.
The image repeats, but only as many times as it fits the box completely After that, the repeats are spaced evenly across the box.
Normal
-moz-
-webkit-
-o-
The image repeats, but if it does not fit the box a whole number of times, it is reduced in size until it does.
Normal
-moz-
-webkit-
-o-
The background fills the border box.
Normal
-moz-
-webkit-
-o-
The background fills the padding box.
Normal
-moz-
-webkit-
-o-
The background fills the content box.
Normal
-moz-
-webkit-
-o-
The background fills the border box, but is not clipped (i.e. it may stretch outside the box).
Normal
-moz-
-webkit-
-o-
The background originates in the padding box.
Normal
-moz-
-webkit-
-o-
The background originates in the border box.
Normal
-moz-
-webkit-
-o-
The background originates in the content box.
Normal
-moz-
-webkit-
-o-
The background image is sized normally.
Normal
-moz-
-webkit-
-o-
The background image’s size is determined by this property (50px 20px in the example).
Normal
-moz-
-webkit-
-o-
The background images’s size is determined by this property (50% 10% in the example).
Effectively, this allows you to state how many times the background image is shown, though resizing will occur.
Normal
-moz-
-webkit-
-o-
The image is scaled to the largest size that allows it to fit in the box, while retaining proper aspect ratio.
Normal
-moz-
-webkit-
-o-
The image is scaled to the largest size that allows it to cover the box completely, while retaining proper aspect ratio.
Normal
-moz-
-webkit-
-o-