a標(biāo)簽在網(wǎng)頁(yè)中經(jīng)常會(huì)用到,其默認(rèn)有下劃線和點(diǎn)擊前和點(diǎn)擊后變色,現(xiàn)在的需求是如何讓其不帶下劃線,以及點(diǎn)擊不變色,下面有個(gè)不錯(cuò)的教程,大家可以參考下
代碼如下:
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)你的功能了,不會(huì)樣式表的話,可以把下面的代碼加到你的頁(yè)面中<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>