css - background-color

Background-color property in CSS 1.0

Property Name

background-color

Version

CSS 1

Description

The background-color property of cascading style sheet sets the background color of an element of the document.

Default value

transparent

Supporting browsers

Firefox
Chrome
Safari
Opera
Internet Explorer


Property values and Description

Value Description
color This property specifies the background color of the element.
transparent This value is default. This property specifies the background color should be visible as transparent.
Inherit This property specifies that background color of the document should be inherited from its parent object or element.

Code view

background-color:#999999;

Demo

The background-color property added to the background of the Sample Text.

Other Variations

background-color:green;
/* you may enter its value through the color names also */
background-color:rgb(255,105,164);
/* you may enter its value as the rgb value also [rgb = red, green and blue] */

Some more examples

background-color:red;
background-color:green;
background-color:blue;
background-color:#09C;
background-color:#F66;
background-color:#939;
background-color:rgb(155,122,255);
background-color:rgb(125,0,201);
background-color:rgb(21,36,199); background-color:hsl(121,75%,41%);


0 comments:

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