CSS Properties for Backgrounds
CSS attributes for styling backgrounds
| Property | Description | Example Values |
|---|---|---|
| background | A shorthand property for setting all background properties in one declaration | #ff0000 url(file.gif) no-repeat top #00ff00 url(file.gif) no-repeat fixed top |
| background-attachment | Sets whether a background image is fixed or scrolls with the rest of the page | scroll fixed |
| background-color | Sets the background color of an element | #ff0000 red rgb(255,0,0) transparent |
| background-image | Sets an image as the background | url(URL) none |
| background-position | Sets the starting position of a background image | top left top center top right center left center center center right bottom left bottom center bottom right 20% 20% 20px 20px 3em 4em |
| background-repeat | Sets if/how a background image will be repeated | repeat repeat-x repeat-y no-repeat |
