First-child the style sheet property used to set the first child object (SELECTOR2) of an object (Selector1). For example, the first row of a list of styles can be different from other rows, but the current IE does not support this pseudo class. The following is a method to simulate the implementation with ASP.
Today to see the classic in the discussion of this issue, Realazy's approach is to use the javascript,zbm2001z approach is to use the expression, I think if this list is read from the database, it may be easier to write with the program. I am not a programmer, only a little of the simplest ASP, such as bad writing, but also please a lot of guidance and understanding!
The following is a reference fragment for ASP code:
' Database Connection code
response.write"<ulclass='fgList'>"
rs.movefirst
response.write"<liclass='firstchild'><atitle=''href='#'>"&rs("列表标题")&"</a></li>"
rs.movenext
dowhilenot(rs.eoforerr)
response.write"<li><atitle=''href='#'>"&rs("列表标题")&"</a></li>"
rs.moveNext
loop
response.write"</ul>"
response.write" ul.fgList{
list-style:none;
}
ul.fgLista{
color:#333333;
background:url(/img/arrow_l2.gif)no-repeat050%;
padding-left:1.5em;
line-height:2em;
text-decoration:none;
}
ul.fgLista:hover{
color:#999999;
text-decoration:underline;
background:inherit;
}
ul.fgListli.firstchilda{
color:#C00;
background:url(/img/arrow_l2_over.gif)no-repeat050%;
}
h3{
font-size:120%;
padding:2em1em.3em.3em;
}