源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> <style> a:link {color:#000000;} /* 未訪問鏈接*/ a:visited {color:#00FF00;} /* 已訪問鏈接 */ a:hover {color:#FF00FF;} /* 鼠標移動到鏈接上 */ a:active {color:#0000FF;} /* 鼠標點擊時 */ </style> </head> <body> <p><b><a href="/css/" target="_blank">這是一個鏈接</a></b></p> <p><b>注意:</b> a:hover 必須在 a:link 和 a:visited 之後,需要嚴格按順序才能看到傚果。</p> <p><b>注意:</b> a:active 必須在 a:hover 之後。</p> </body> </html>
運行結果