CSS NOTES
CH 10 pg 226
-
, , elements
- Associate element <p> p{font-family: Arial;}
- p=selector {}=Declaration
- Declarations can add properties and values
- html can be externally linked to CSS file that styles it
- href specifies path
<link href="css/styles.css" type="text/css" rel="stylesheet" />
<style>
<style type="text/css">
- specifies?
Selectors
Colors ch11 pg 247 pdf 245
- specify via RBG
- rgb(100,100,90)
- Hex
- For example: #ee3e80
- Color names
- DarkCyan
background color
body { background-color: rgb(200,200,200);} h1 { background-color: DarkCyan;} h2 { background-color: #ee3e80;} p { background-color: white;}
- RGB (102,205,170) (red,grn,blu) (###,###,###)
- HEX #66cdaa 66=102red, cd=105grn, aa=170blu
Opacity
- The value is a number between
0.0 and 1.0 (so a value of 0.5
is 50% opacity and 0.15 is 15%
opacity).
p.one { background-color: rgb(0,0,0); opacity: 0.5;} p.two { background-color: rgb(0,0,0); background-color: rgba(0,0,0,0.5);}
- RGBA
- HSL color, Hue, Saturation, Lightsness
- CSS3: HSL & HSLA
Color
</head>
pH Scale
14.0 VERY ALKALINE
13.0
12.0
11.0
10.0
9.0
8.0
7.0 NEUTRAL
6.0
5.0
4.0
3.0
2.0
1.0
0.0 VERY ACID<