設(shè)置超鏈接的樣式示例:
a:link 超鏈接被點前狀態(tài)
a:visited 超鏈接點擊后狀態(tài)
a:hover 懸停在超鏈接時
a:active 點擊超鏈接時
在定義這些狀態(tài)時,有一個順序l v h a。
(推薦教程:html教程)
代碼區(qū):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>無標(biāo)題文檔</title> <style type="text/css"> a:link { color:#000; text-decoration:none;} a:visited { color:#000; text-decoration:none;} a:hover { color:#F00; text-decoration:underline;} a:active { color:#F90; text-decoration:underline;} </style> <link href="Untitled-1.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="http://www.baidu.com/">百度一下</a> </body> </html>
運行顯示:鼠標(biāo)箭頭未放到“百度一下”,其顯示黑色——放上時,其顯示紅色——點擊“百度一下”鏈接時,其顯示橙色——點擊后,其顯示黑色。
相關(guān)視頻教程推薦:html視頻教程
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com