CSS Background Property

In this chapter we will talk about styles of the background.

As you know we can make some changes in order to make our website much more beautiful with Cascading Style Sheets (CSS).

The background has the following properties:

Internet Explorer 8 and its earlier versions do not support multiple background images on one element.

We will learn about these properties in the next chapters.

We can use more than one property at the same time.

The background-color property is used when we want to change the color of some tag background.

By default the background-color of tags is transparent.



The background-image property sets one or several background images for an element.

With the background-repeat property we can control the repeated position of an element.



We use the background-position property for the background image position.

The background-size property is used to define the background image size.

The background-attachment property defines if the background image is fixed or it will scroll along with the rest of the page.

The background-origin property defines the background positioning area which is the position of an image which is placed by using the background-image property.

The background-clip property is used to place background image or color to underneath its border.