ASP+CSS 實現列表隔行換色_CSS/HTML

來源:互聯網
上載者:User
列表隔行換色是指在新聞和文章列表中,前一行和後一行的背景色交替顯示,也可稱為斑馬線,給網頁可增色不少。今看到小毅在BI的貼子“標準下隔行換色的思考”,採用UL的兩行背景重複,雖說方法不錯,但LI裡的高度只能採用背景中的實際高度,不夠靈活,所以用ASP+CSS 寫了一個,採用自訂欄表。

<%set rs=......sql="......"rs.open sql,con,1,1%>
 
<% i=0do while not (rs.eof or err)%>
&id=<%=rs("id")%>"><%=rs("biaoti")%>
<% if i mod 2 = 0 then%>
<% else %>
<% end if %><%=rs("zhaiyao")%>
<%i=i+1rs.moveNextloop%>
  • 相關文章

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.