使用CSS,当您将鼠标悬停在链接上时,可以轻松地将自定义颜色应用于链接:
.myId:hover{
color:green;
}
Run Code Online (Sandbox Code Playgroud)
但是样式标签怎么样?有可能做一些事情:
<a style="*insert nifty markup here to change color on hover*" href="somewhere.html">text</a>
Run Code Online (Sandbox Code Playgroud)
或者只是通过第一种方法改变悬停颜色(仅使用html/css,不允许使用javascript).