HTML CSS examples for CSS Widget:Table Row
Make table rows hover color
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> tr:nth-child(odd) { background-color:Chartreuse; } tr:nth-child(even) { background-color:yellow; } tr:hover {<!--from w w w .j a va 2 s . c o m--> background-color:blue; } </style> </head> <body> <table> <tbody> <tr> <td>Lore</td> <td>Lor</td> </tr> <tr> <td>Lore</td> <td>Lor</td> </tr> <tr> <td>Lore</td> <td>Lorem</td> </tr> <tr> <td>Lore</td> <td>Lore</td> </tr> <tr> <td>Lore</td> <td>Lore</td> </tr> <tr> <td>Lore</td> <td>Lor</td> </tr> </tbody> </table> </body> </html>