主题:  急!请问,这段css代码哪里有错?

lrfc

职务:普通成员
等级:2
金币:1.0
发贴:311
注册:2001/2/16 16:52:47
#12002/11/1 14:43:35
请问,这段css代码哪里有错?为什么鼠标放上去后不能显红色?只是始终是链接的黑颜色?
a:link {
    font_size:9pt;
    color:#000000;
    text-decoration: none;
    font-family: "宋体";
    font-size: 9pt;
    line-height: 150%;
}
a:hover {
    font-size: 9pt;
    color: #ff0000;
    text-decoration: none;
    line-height: 150%;
    font-family: "宋体";
}
a:visited {
    font_size:9pt;
    color:#000000;
    text-decoration:none;
    font-family: "宋体";
    font-size: 9pt;
    line-height: 150%;
}
a:active {
    font_size:9pt;
    color:#000000;
    text-decoration: none;
    font-family: "宋体";
    font-size: 9pt;
    line-height: 150%;
}
font a:hover { font-size: 9pt; color: #ff0000; text-decoration: none}
table { background-repeat: repeat-y}
font { font-size: 9pt; text-decoration: none}
td { font-size: 9pt; text-decoration: none}
h2 { display="none" }
.word1 {
    font-family: "宋体";
    font-size: 9pt;
    line-height: 150%;
    font-weight: bolder;
    color: #000000;
    text-decoration: none;
}



彩云传说

职务:普通成员
等级:2
金币:10.0
发贴:618
注册:2001/5/27 21:26:20
#22002/11/1 19:26:44
链接的优先级有设错:
顺序应当是
a:link{ }
a:visited{ }
a:hover{ }
a:active{ }


同时你的代码真正的冗长无用,如每句都有两个font-size等,且 font a:hover{ } 等更是没用,可以DEL掉。

编辑历史:[这消息被达闻西编辑过(编辑时间2002-11-01 19:34:07)]
[这消息被flood编辑过(编辑时间2002-11-04 07:00:15)]


qiumoyan99

职务:普通成员
等级:1
金币:0.0
发贴:5
注册:2002/11/3 12:04:35
#32002/11/3 13:05:23
因为你的a:visited设置的是黑色,访问后也就是说那些连接点击一次以后,鼠标再上放上去,就不会变成红色了,只在第一次点击时变红,你的代码很多没有必要,正如楼上所说



NudeAngel

职务:普通成员
等级:3
金币:10.0
发贴:793
注册:2002/1/29 14:14:58
#42002/11/3 22:04:21
qiumoyan99在上个帖子中说
引用:
因为你的a:visited设置的是黑色,访问后也就是说那些连接点击一次以后,鼠标再上放上去,就不会变成红色了,只在第一次点击时变红,你的代码很多没有必要,正如楼上所说

优先级别设置正确后就不会有这种问题了.