css - background

background property in CSS 1.0

Property Name

background

Version

CSS 1

Description

The background shorthand property sets its all background properties in all in one line.

You can set all background properties like background-color, background-clip, background-attachement, background-image, background-origin, background-repeat, background-size and background-position.

Default value

You can see this in individual background properties

Supporting browsers

Firefox
Chrome
Safari
Opera
Internet Explorer

Property values and Description

Value Description
background-color This property indicates the background color of the element.
background-position This property indicates the starting position of the background image.
background-size This property indicates the size of the background image.[CSS-3.0]
background-repeat This property indicates repeating of the background image.
background-origin This property indicates exact position area of the background image.[CSS-3.0]
background-clip This property indicates painting or visible area of the background image.[CSS-3.0]
background-attachment This property indicates whether the background image fixed or scrolled with rest of the page elements.
background-image This property indicates one or more background image may be applied to the page.

Code view

background:#FC9 url(images/bacground-image.jpg) no-repeat 50px 100px fixed;

Code Description

background:color image repeat positionX positionY position

Demo

The background properties added to the background of the demo page.


0 comments:

Template by Clairvo Yance
Copyright © 2013 EASYCODE and Blogger Themes.