a標(biāo)簽怎么去下劃線以及實(shí)現(xiàn)點(diǎn)擊前和點(diǎn)擊后不變色

字號:


    a標(biāo)簽在網(wǎng)頁中經(jīng)常會用到,其默認(rèn)有下劃線和點(diǎn)擊前和點(diǎn)擊后變色,現(xiàn)在的需求是如何讓其不帶下劃線,以及點(diǎn)擊不變色,下面有個不錯的教程,大家可以參考下 
    代碼如下:
    a:link { 
    font-size: 12px; 
    color: #000000; 
    text-decoration: none; 
    } 
    a:visited { 
    font-size: 12px; 
    color: #000000; 
    text-decoration: none; 
    } 
    a:hover { 
    font-size: 12px; 
    color: #999999; 
    text-decoration: underline; 
    } 
    這樣定義樣式表就可以實(shí)現(xiàn)你的功能了,不會樣式表的話,可以把下面的代碼加到你的頁面中<head></head>標(biāo)簽里: 
    代碼如下:
    <style type="text/css"> 
    <!-- 
    a:link { 
    font-size: 12px; 
    color: #000000; 
    text-decoration: none; 
    } 
    a:visited { 
    font-size: 12px; 
    color: #000000; 
    text-decoration: none; 
    } 
    a:hover { 
    font-size: 12px; 
    color: #999999; 
    text-decoration: underline; 
    } 
    --> 
    </style>