超链接样式不起作用,请教!

来源:百度知道 编辑:UC知道 时间:2024/06/07 03:55:07
css文件这样的

.9 {line-height:20px;}
.9 a:link { text-decoration: none; color: #990000; font-family: "Verdana", "宋体" ;FONT-SIZE: 12px;text-decoration: none;}
.9 a:visited { text-decoration: none; color: #565656; font-family: "Verdana", "宋体" }
.9 a:hover { text-decoration: none; color: #FB6A00 }

页面里面这样
<div id=marqueebox0
style="OVERFLOW: hidden; LINE-HEIGHT: 16px; HEIGHT: 52px">
<%
dim shu,news,bigclassid,smallclassid,specialid,order,time,path,click,title
typeid=21
shu=6
Path = "./"
if shu<>"" then '显示数目,不加为5
ss=shu
else
ss=10
end if
if order="click" then '排序方式,click为按点击率
oo="click"
else
oo="newsid"
end if
if time="0" then '显示时间,0为不显示
tt=0
else
tt=1
end if
if click=&quo

你那样写当然看不到效果了。不能说你的写的CSS有错
.9 {line-height:20px;}
.9 a:link { text-decoration: none; color: #990000; font-family: "Verdana", "宋体" ;FONT-SIZE: 12px;text-decoration: none;}
.9 a:visited { text-decoration: none; color: #565656; font-family: "Verdana", "宋体" }
.9 a:hover { text-decoration: none; color: #FB6A00 }

一般情况下我们通常这样子写:
a:link { text-decoration: none; color: #990000; font-family: "Verdana", "宋体" ;FONT-SIZE: 12px;text-decoration: none;}
a:visited { text-decoration: none; color: #565656; font-family: "Verdana", "宋体" }
a:hover { text-decoration: none; color: #FB6A00 }
然后,CSS样式名一般不用纯数字。
最重要的就是后面那里,<font class=9> 这个是绝对错误的。
假如你像我上面那样写根本不需要进行套用。只要你写了CSS代码就可以生效了。"a"超链接样式是伪类。
如果你想对部分超链接进行样式定义的话,那也不能那样套用,至少如:<a href="<%=path%>ReadNews.asp?NewsID=<%=rs("NewsID")%>" title="<%=title%>