DW怎样设置:鼠标晃到文字上后,文字改变颜色?

2025-04-13 14:18:46
推荐回答(1个)
回答1:

所谓DW是指dreamweaver吗?

这个效果使用一般的HTML语言就可以实现的,可以用CSS写,也可以直接写

有连接的话定义CSS

a:link {
font-family: "宋体";
font-size: 12px;
line-height: 18px;
text-decoration: none;
color: #666633;
}
a:visited {
font-family: "宋体";
font-size: 12px;
line-height: 18px;
color: #666633;
text-decoration: none;
}
a:hover {
font-family: "宋体";
font-size: 12px;
line-height: 18px;
color: #000000;
text-decoration: none;
}

这样定义的话只要有连接...字体的颜色就是#666633..然后鼠标放上去之后颜色变成#000000...

如果没有连接的话

<td onmouseout="this.style.fontcolor="#ff0000"" onmouseover="this.style.backgroundColor=""">

这样之后鼠标放上去颜色变成#ff0000...挪开之后颜色变回原本的