Pages

Wednesday, June 11, 2014

The css Background Color value in the body selector


The background-color css property specifies the background color of a part.

The background color of a page is outlined within the body css selector:

Example

body {
    background-color: #b0c4de;
}

With CSS, a color is most frequently such that by:
  •     a HEX worth - like "#ff0000"
  •     associate degree RGB worth - like "rgb(255,0,0)"
  •     a color name - like "red"
Look at CSS3 Rules Color Values for a whole list of attainable color values.
In the css example below, the h1, p, and div parts have completely different background colors:

Example

h1 {
    background-color: #6495ed;
}

p {
    background-color: #e0ffff;
}

div {
    background-color: #b0c4de;
}

No comments:

Post a Comment