问题二:在用DreamWeaver3.0制作主页的时候,由于同一页面中背景色不尽相同,所以需要用到多种超级链接样式,但用CSS实现(a:link
a:hover a:visited)时,一个页面中始终只能呈现一种,我不知道怎样能实现。请详细告知,非常感谢。 读者:小脊牛 mailto:[email protected]
Ant答:首先是肯定能实现的,而且实现的方法很简单.看下面的代码.
<style type="text/css">
<!--
.ant a:hover { font-size: 9pt; color: #00FF00; text-decoration:
underline}
.ant a:link { font-size: 9pt; color: #FFFFFF; text-decoration:
none}
.ant a:visited { font-size: 9pt; color: #FFFFFF; text-decoration:
none}
.cat a:hover { font-size: 9pt; color: #CC0033; text-decoration:
underline}
.cat a:link { font-size: 9pt; color: #FFFFFF; text-decoration:
none}
.cat a:visited { font-size: 9pt; color: #FFFFFF; text-decoration:
none}
-->
</style>
相信你能看懂上面的代码,以前一般的作法只是用了一个hover一个link一个visited,现在这里把他分成了ant和cat两个.然后你就可以各取所需了.实现的方法你可用span,class,和div的方法(可参见第28期网页制作).例
<table width="75%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td class=ant><a href="url">上海</a></td>
</tr>
<tr>
<td class=cat><a href="url">中国</a>
</td>
</tr>
</table>
这样就呈现出两种不同的样式了.:)
Ant档案:个人主页: http://simhome.yeah.net Email:[email protected]