CSS background property
CSS

CSS background property

Editorial Team
Editorial Team

Follow us on Discord or Telegram to get access to free tutorials and updates.

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.