Ba
|
CSS3 Backgrounds(Fg. 1) CSS3 contains several new background properties,
which allow greater control of the background element.
All web browsers (excluding Internet Explorer 8 and below) supports the background-size and background-origin property. |
Fg. 1 (CSS3 Backgrounds)
div
|
|
Fg. 2.1 (CSS3 Background Sizes)
div
Fg. 2.2 (CSS3 Background Sizes)
div
|
CSS3 Background Sizes(Fg.s 2) The background-size property specifies the size of the background image.
I
Syntax
background-size: length|percentage|cover|contain;
You can specify the size in pixels or in percentages. If you specify the size as a percentage, the size is relative to the width and height of the parent element. (Fg. 2.1 & Fg. 2.2) |
|
CSS3 Background Origin(Fg.s 3) The background-origin property specifies the positioning area of the background images.
Syntax
background-origin: padding-box|border-box|content-box;
The background-origin property specifies what the background-position property should be relative to. If the background-attachment property for the background image is "fixed", this property has no effect. (Fg. 3.1 & Fg. 3.2) |
Fg. 3.1 (CSS3 Background Origin)
div
Fg. 3.2 (CSS3 Background Origin)
body
|