CSS Styling based on State¶
This lab covers styling based on state.
In addition to selecting by element type, class, or id, CSS can select by state. An example is selecting elements as the mouse hovers over them. Another example is the visited state for links that have already been clicked on (note: this does not appear to work in JSFiddle)
CSS:
1 2 3 4 |
|
HTML:
1 2 3 4 5 6 7 8 |
|
This interaction is best viewed live. Try the example below. on JSFiddle.
Link to Example¶
Experiment Ideas¶
- Make the link being hovered over change font
- Change the color of links being hovered over with the w3schools color picker