CSS background property
CSS

CSS background property

Mishel Shaji
Mishel Shaji

The CSS background is a shorthand property that is used to set the background style for an element.

This shorthand property can be used to set the following CSS background properties in a single declaration.

PropertyDescription
background-colorSpecifies the background color
background-imageSpecifies the background image
background-positionSpecifies the position of the background image
background-sizeSpecifies the size of the background image
background-repeatSpecifies how the background should repeat
background-originSpecifies the positioning area of the background image
background-clip
Specifies whether the background of an element should extend underneath its border.
background-attachmentSpecifies whether the background image should appear fixed or scroll within the block.