Color
It is time to explore color a little more deeply. Add the
following color styles for the body
element and
the .thumbnail-item
class in styles.css.
body { font-size: 10px; background: rgb(149, 194, 215); } a { text-decoration: none; } .thumbnail-item { border: 1px solid rgb(100%, 100%, 100%); border: 1px solid rgba(100%, 100%, 100%, 0.8); } ...
You have declared values for the .thumbnail-item
’s border twice. Why?
Notice that the two declarations use slightly different color functions: rgb
and rgba
.
The rgba
color function accepts a fourth argument,
which is the opacity. However, some browsers do not support
rgba
, so providing both declarations is a technique that provides a
fallback value.
All browsers will see the first ...
Get Front-End Web Development: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.