Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

CSS background properties

 

CSS background properties specify how to set styles (like set an image, set color etc.) for the background of an HTML element or an HTML web-page.

List CSS background properties

  • CSS background-color property sets a background color of an HTML element or an entire HTML page
  • CSS background-image property sets an image in the background of an HTML element or an entire HTML page
  • CSS background-repeat property repeats an image in the background of an HTML element or an entire HTML page, either in the horizontal or in the vertical direction.
  • CSS background-attachment property specifies whether an image in the background of an HTML element or an entire HTML page, is fixed or scrolls along with the viewable area.
  • CSS background-position property specifies the initial position of an image in the background of an HTML element or an entire HTML page.
  • CSS background-position property specifies the initial position of an image in the background of an HTML element or an entire HTML page.
  • CSS background property can be used to set all the properties mentioned above with a single property. This kind of a use is referred as CSS shorthand property.

In the next page, we have discussed CSS background-color property.

Previous: CSS pseudo elements
Next: CSS background color properties