Setting Element Backgrounds

Description

The properties to style the background are described in the following list.

  • background-color
    Sets the background color for an element.
    The color is drawn behind any images.
  • background-image
    Sets the background images for an element.
    If more than one image is specified, each subsequent image is drawn behind those that precede it.
  • background-repeat
    Sets the repeat style for images.
  • background-size
    Sets the size of a background image.
  • background-position
    Positions the background image.
  • background-attachment
    Sets the attachment style for images that are in an element that has a viewport.
  • background-clip
    Specifies the clipping style for images.
  • background-origin
    Positions the background image.
  • background
    Shorthand element.




















Home »
  HTML CSS »
    CSS »




CSS Introduction
CSS Background
CSS Border
CSS Box Layout
CSS Text
CSS Font
CSS Form
CSS List
CSS Selectors
CSS Others
CSS Table