Figure 5.1. A basic HTML page with a link
Nowlet’saddthefollowingCSStoourstyle.css
a {
transition: 1s;
}
a:link {
color: #309;
}
a:hover {
color: #f0c;
}
ThisisthebareminimumCSSrequiredforatransitiontowork:astartvalue(color:
#309),anendvalue(color: #f0c),andatransitionduration(transition: 1s;).
Whenyoumouseoverthelink,you’llseeagradualtransitionfrombluetohotpink,
asillustratedinFigure5.2.
192 CSS Master