3 回答

TA貢獻(xiàn)1828條經(jīng)驗 獲得超3個贊
未被點(diǎn)擊時超鏈接文字無下劃線,顯示為藍(lán)色;當(dāng)鼠標(biāo)在鏈接上時有下劃線,鏈接文字顯示為紅色;當(dāng)點(diǎn)擊鏈接后,鏈接無下劃線,顯示為綠色。
實現(xiàn)方法很簡單,在源代碼的<head>和<head>之間加上如下的CSS語法控制:
<style type="text/css">
<!--
a:link { text-decoration: none;color: blue}
a:active { text-decoration:blink}
a:hover { text-decoration:underline;color: red}
a:visited { text-decoration: none;color: green}
-->
</style>
下面是解釋,可以根據(jù)自己的需要修改
其中:
a:link 指正常的未被訪問過的鏈接;
a:active 指正在點(diǎn)的鏈接;
a:hover 指鼠標(biāo)在鏈接上;
a:visited 指已經(jīng)訪問過的鏈接;
text-decoration是文字修飾效果的意思;
none參數(shù)表示超鏈接文字不顯示下劃線;
underline參數(shù)表示超鏈接的文字有下劃線

TA貢獻(xiàn)2021條經(jīng)驗 獲得超8個贊
加到你的CSS樣式表里
body {color: #顏色代碼 !important} /*設(shè)置全局沒鏈接的文字顏色*/
a:link {color: #顏色代碼 !important} /*設(shè)置全局未點(diǎn)擊鏈接的顏色*/
a:visited {color: #顏色代碼 !important} /*設(shè)置全局被點(diǎn)擊后的鏈接顏色*/
a:hover {color: #顏色代碼 !important} /*設(shè)置全局鼠標(biāo)懸停在鏈接上未點(diǎn)擊時的顏色*/
a:active {color: #顏色代碼 !important} /*設(shè)置全局鼠標(biāo)在點(diǎn)擊鏈接瞬間發(fā)生的動作*/
添加回答
舉報