Styling CSS Flashcards
Not all browsers support newer CSS features, like opacity (a value = transparent) or HSL, what would you include in your code to work around this obstacle?
.container {
font-color: rgba(22, 29, 145, 0.50);
font-color: rgb(22, 29, 145,);
}
What is the difference the foreground and background?
The foreground is the color of the selected letters and background color is the color of the area behind the selected letters. For example:
foreground color is: color: Aqua;
background color is: background-color: MidnightBlue;
What does HSL stand for? What does each letter mean?
Hue - represented on a color wheel and take values between 0 and 360
Saturation is the amount of gray in a given color. It’s specified using a percentage between 0% and 100%, 0 showing a shade of gray, 50 being normal and 100 being white.
Lightness is the amount of white in a given color. Also specified using a percentage. 0 shows black, 50 norma and 100 white.
How do you modify RGB colors and HSL to include how transparent the color is?
color: rgba(21, 72, 124);
What are the three declarations for the color property and give an example of how to write all three color declarations.
The three color declarations are:
- rgb
- hsl
- hex
color: rgb(21, 72, 52);
color: #09AA34;
color: hsl(20, 86%, 72%);