Background Properties

Background - position

Background-position property sets the position of the background image. Default behaviour is left-top corner and repeated both horizontally and vertically. Background-position values:

  1. Keyword values: top,bottom, left, right, center
  2. Percentage values
  3. Length values
  4. Multiple images
  5. Edge offset values
  6. Global values: inherit, initial, revert, revert-layer, unset

Background - attachment

Background-attachment property sets if the image is attached to the viewport or not. Background-attachement values:

  1. scroll
  2. fixed
  3. local - fixed relative to the element's contents
  4. local, scroll
  5. scroll, local

Background - size

Background-size sets the size of the element's background image. Its values:

  1. contain
  2. cover

Background - edge offset

Background edge offset refers to background-position property. It allows to position the background image relatively to a specified edge.

Background - multiple stack order

Multiple backgrounds are layered on one another and only last background can include a background color. For example, background: background1, background2; etc. The first background is layered on the top and the second in the back.

Summary of the documentation

There are many background properties. Shorthand background sets all background properties at once such as image, size, color or origin.