怎么把超链接的下划线做成虚线的?

来源:百度知道 编辑:UC知道 时间:2024/05/30 10:08:06
最好是说说具体做法~!!谢谢了~~.....

用CSS:
<style type="text/css">
<!--
a:link {
border-bottom:#000000 dashed 1px;
text-decoration:none;
}
a:visited {
border-bottom:#000000 dashed 1px;
text-decoration:none;
}
a:active {
border-bottom:#000000 dashed 1px;
text-decoration:none;
}
a:hover {
border-bottom:#000000 dashed 1px;
text-decoration:none;
}
-->
</style>

<a href="#">看看效果</a>

使用JavaScript写一段document.write单元格的循环程序。首先将程序列出来:

<script>len=400;d1=2;d2=2;cou=Math.floor(len/(d1+d2));
document.write('<table cellspacing=0 cellpadding=0 height=1 width='+len+'><tr>');
for(i=0;i<cou;i++){document.write('<td width='+d2+'><td width='+d1+' bgcolor=333333>')}</script></table>
说明:len=400表示虚线的长度为400像素,d1和d2是黑白相间的间隔,cou=Math.floor(len/(d1+d2)),cou表示总共要循环的次