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;
}
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"
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;
}
background-color: #6495ed;
}
p {
background-color: #e0ffff;
}
div {
background-color: #b0c4de;
}

No comments:
Post a Comment