CSS BACKGROUND
The background property is a shorthand property for setting all background properties in one declaration.
Example
|
body {background: #FF0000} body {background: url(stars.gif) no-repeat top} body {background: #00FF00 url(stars.gif) no-repeat fixed top} |
Possible Values
| Value | Description |
|
background-color background-image background-repeat background-attachment background-position |
You can declare from one to five background properties in this declaration |


8 Responses
i have checked it its easy and important.
works fine mate.
very usefull!!!
Can we use background-position for the background:#FFFFFF
Hi,
You can also use color gradients for background.
Example:
background: linear-gradient(top left, #1f1, #fff, #11f);
Great point CoursesWeb. I have used the gradient background several times. I wish all browsers supported it. It is a lot of extra work to make sure things are backwards compatible.
Useful explanation. A nice quick reference.
need more example with height and width dimension