CSS2 - Background Properties


Advertisements


This is a complete reference guide for web developers where we have listed all the CSS properties related to background defined in the World Wide Web Consortium's Recommended Specification for Cascading Style Sheets, Level 2.

Click any property to see its description with examples:

Property Description

background

Composite property for the following properties −

  • background-attachment
  • background-color
  • background-image
  • background-position
  • background-repeat

background-attachment

Determines if the background image is fixed in the window or scrolls as the document scrolls.

background-color

Sets the background color of an element.

background-image

Sets the background image of an element.

background-position

Sets the initial position of the element's background image, if specified; values normally are paired to provide x, y positions; default position is 0% 0%.

background-repeat

Determines how the background image is repeated (tiled) across an element.

css_references.htm

Advertisements