How to alternate HTML table row colors using JSP?

后端 未结 6 1534
你的背包
你的背包 2020-12-05 17:35

How do I alternate HTML table row colors using JSP?

My CSS looks something like:

tr.odd {background-color: #EEDDEE}
tr.even {background-color: #EEEED         


        
6条回答
  •  悲&欢浪女
    2020-12-05 18:19

    Just do like this and is going to work:

    table tr:nth-child(odd) { background-color: #ccc; }
    

提交回复
热议问题