css这样写:
a:link {
color:#f90
}
:link 还可以换成:hover,visited,active;分别设置链接效果,鼠标指上去效果,访问过后的效果,点下那一瞬间的效果。
高级用法 可以a:visited:hover,可以设置访问过的链接鼠标指上去的效果,和未访问指上去的效果a:hover 可以区别开来
其实很简单,定义两个class样式表,就行了。 样式表(具体样式自己调整): .table1{ /*正常样式*/ text-decoration:none} .table1 A:link{} .table1 A:visited{color:#0000ff} .table1 A:hover {color: #ff0000} .table2{ /*正常样式*/ margin-top:20pxtext-decoration:none} .table2 A:link{} .table2 A:visited{ color:red} .table2 A:hover {color: blue} HTML元素部分: <table class="table1"><thead><tr><th>name </th><th>info </th></tr></thead><tbody><tr><td><a href="#">nishi</a></td><td><a href="#">nishi info</td></tr></tr></tbody></table> <table class="table2"><thead><tr><th>name </th><th>info </th></tr></thead><tbody><tr><td><a href="#">nishi</a></td><td><a href="#">nishi info</td></tr></tr></tbody></table>