如何在同一页面定义两种不同颜色的链接
因为设计人员的需要,要在同一页面弄两种颜色的链接,故找到如下方法:
<html>
 <head>
 <title>中国站长天空-网页特效-文本特效-同一页面两种不同颜色的超链接</title>
 <meta http-equiv="content-Type" content="text/html;charset=gb2312">
 <!--把下面代码加到<head>与</head>之间-->
 <style type="text/css">
 <!--
 A.style1:link {
 text-decoration: none;
 color: #ff9966;
 font-weight: normal;
 }
 A.style1:visited {
 text-decoration: none;
 color: #ff9966;
 font-weight: normal;
 }
 A.style1:active {
 text-decoration: none;
 color: #ff9966;
 font-weight: normal;
 }
 A.style1:hover {
 text-decoration: underline;
 color: #ff0000;
 font-weight: normal;
 }
 A.style2:link {
 text-decoration: underline;
 color:#ff3322;
 font-weight: normal;
 }
 A.style2:visited {
 text-decoration: underline;
 color: #ff3322;
 font-weight: normal;
 }
 A.style2:active {
 text-decoration: none;
 color: #0033ff;
 font-weight: normal;
 }
 A.style2:hover {
 text-decoration: none;
 color: #0033ff;
 font-weight: normal;
 }
 -->
 </style>
 </head>
 <body>
 <!--把下面代码加到<body>与</body>之间-->
 <a href="http://www.zzsky.cn" target="_blank">中国站长天空</a><br><br>
 <a href="http://www.zzsky.cn" target="_blank">中国站长天空</a>
 </body>
 </html>
另外,说下不相关的:如果JS代码在页面中不起作用,如何解决?
当从页面代码中抽离出来的js单独放在head中不起作用时,那么可以尝试将其放在</body>或</html>后,因为可能有些js放在<head>还没有加载,所以不能够起作用。
 
 