HTML and CSS Reference
In-Depth Information
div > div {
background-color:
rgba(102,102,102, 0.2); }
div {
background-color:
rgba(102,102,102, 0); }
See listing ch09/rgba-3.html for the full code.
HSL and HSLA
You may have found yourself wanting a
darker shade of a particular color as a
contrasting element in one of your
designs. This is easy to manage in simple
cases with RGB —just make the num-
bers smaller, as in the next example.
For those of you reading this topic on
paper in black and white, the top pair of
elements that follow are shades of gray,
the middle pair are shades of blue, and
the bottom pair are a sort of purple/pink
combination:
Full
Partial
2.0
-
3.0
-
9.0
-
10.0
-
3.1
-
.one {
background-color:
rgb(204,204,204);
color: rgb(102,102,102);
}
.darkone {
background-color:
rgb(102,102,102);
color: rgb(204,204,204);
}
.two {
background-color: rgb(51,102,153);
color: rgb(17,34,51);
}
.darktwo {
background-color: rgb(17,34,51);
color: rgb(51,102,153);
}
Search WWH ::




Custom Search