喜悦国际村 » XML/HTML/CSS/Js » 如何为超级连接定义不同颜色

页: [1]
taita19732004-8-8 05:18 AM
如何为超级连接定义不同颜色

同一页面中的超级连接颜色是相同的,能否为超级连接定义不同颜色?怎样定义。

freisinger2004-8-12 03:10 PM
建立css样式表如下

a:link        { color: #000080; text-decoration: none }
a:visited        { color: #808080; text-decoration: none }
a:active        { color: #660066; text-decoration: none }
a:hover        { color: #660066; text-decoration: none; position: relative; right: 0px; top: 0px }

a.weiter:link        { color: #000080; text-decoration: none; font-size:8pt}
a.weiter:visited        { color: #808080; text-decoration: none; font-size:8pt}
a.weiter:active        { color: #660066; text-decoration: none; font-size:8pt}
a.weiter:hover        { color: #660066; text-decoration: none; position: relative; right: 1px; top: 1px; font-size:8pt}

前面四行是默认设置
后四行是新的定义
使用方法:
<a href="http://www.phpx.com" class="weiter">PHPX</a>

请参考。


查看完整版本: 如何为超级连接定义不同颜色


Powered by Discuz! Archiver 6.1.0  © 2001-2006 Comsenz Inc.
Processed in 0.006027 second(s), 2 queries