Q:如何取消链接的下划线?
A:用CSS来实现:
<style type="text/css">
<!--
a:link { text-decoration: none}
a:visited { text-decoration: none}
a:hover { text-decoration: none}
-->
</style>
其中a:link 表示一般的链接样式;a:visited 表示已访问过的链接样式;a:hover 表示鼠标经过时的链接样式。text-decoration: none 表示无下划线,text-decoration: underline 表示有下划线。
如果三种链接状态的样式相同,也可以简化为:
<style type="text/css">
<!--
a { text-decoration: none}
-->
</style>