HTML CSS examples for CSS Widget:Table Row
Make alternating CSS table row style work
<html> <head> <meta name="viewport" content="width=device-width"> <!--[if lte IE 9]> <script src="https://rawgit.com/roylory/ie7-js/master/lib/IE9.js"></script> <![endif]--> <!-- www . j a v a 2s. c om--> <style> table { width:100%; } tr:nth-child(2n) td { background-color:Chartreuse; } </style> </head> <body> <table> <tbody> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> <tr> <td>Lor</td> </tr> </tbody> </table> </body> </html>