All CSS Background Properties
The background Property
The background property is a shorthand property for specifying all the background properties in one declaration.
Here, the background image is only shown once, and it is also positioned in the top-right corner.
We have also added a right margin, so that the text will not write over the background image.
Property | Description |
---|---|
background | Sets all the background properties in one declaration |
background-attachment | Sets whether a background image is fixed or scrolls with the rest of the page |
background-clip | Specifies the painting area of the background |
background-color | Sets the background color of an element |
background-image | Sets the background image for an element |
background-origin | Specifies where the background image(s) is/are positioned |
background-position | Sets the starting position of a background image |
background-repeat | Sets how a background image will be repeated |
background-size | Specifies the size of the background image(s) |