CSS Background Property

CSS 1

CSS 2

CSS 3

Yes Yes Yes

Description

Sets the background properties. Used as a type of shortcut, instead of listing each property separately.

Syntax

background: [value1] [value2] ...

Possible values

  • [background-attachment]
  • [background-color]
  • [background-image]
  • [background-position]
  • [background-repeat]
  • inherit

Initial Value

See individual properties

Applies To

All elements

Inherited

No

Media

Visual

Example

body {
 background: url(images/graphic.jpg) #FFF7B5 30% repeat fixed;
}


View All CSS Properties