CSS ??
1 CSS ??? ? ?? ??:
a:link - ??, ???? ?? ?? a:visited - ???? ??? ?? a:hover - ??? ???? ?? ?? ????. a:active - ??? ???? ??
?? ??? ?? ??? ??? ?????. ?? ????? ???? ?? index.html? ?? ?? test.css ??? ????. html. ??? html ??? ?????.
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title>css test</title> <script src="app.js"></script> <link rel="stylesheet" type="text/css" href="test.css"> </head> <body > <a href="http://ipnx.cn">php</a> </body> </html>
CSS ??? ??? ??? ????.
a:link {color:#FF0000;} /* 未被訪(fǎng)問(wèn)的鏈接 */ a:visited {color:#00FF00;} /* 已被訪(fǎng)問(wèn)的鏈接 */ a:hover {color:#FF00FF;} /* 鼠標(biāo)指針移動(dòng)到鏈接上 */ a:active {color:#0000FF;} /* 正在被點(diǎn)擊的鏈接 */
?? ??? ???????. ???? ?? ?????.
???? ??? ?? ?? ?????.
??? ??? ??? ????. ???:
??? ?? ?????.
??? ???? ? ?? ? ? ?? ??? ???? ?? ??: a:hover? After :link? ??? ?? a:visited, a:active? a:hover ?? ??? ???
1.2 CSS ?? ??? ??
?? ?? ??? background-color? ???? ??? ?????. ???? ??? ?? ?? CSS ??? ???? ?????.
a:link {background-color:#B2FF99;} a:visited {background-color:#FFFF85;} a:hover {background-color:#FF704D;} a:active {background-color:#FF704D;}
??? ???. ???? ????? ??? ?? ?????
1.3 ?? ?? ??
?? ?? ??? ?? ??? ?? ???? ??? ??? ??? ???. ??? ???? link ??? text-?? ??? ???? ?? ??? ???? ???? ???. ?? ? ??? ??? ????.