C
运行 »
×
下载代码
⇫
加载文件
改变主题,夜晚/白天
<!DOCTYPE> <html> <head> <style> table, th, td { border: 1px solid black; border-collapse: collapse; } th, td { padding: 10px; } table#alter tr:nth-child(even) { background-color: #eee; } table#alter tr:nth-child(odd) { background-color: #fff; } table#alter th { color: white; background-color: gray; } </style> </head> <body> <table id="alter"> <tr><th>名</th><th>姓</th><th>分数</th></tr> <tr><td>三</td><td>张</td><td>70</td></tr> <tr><td>四</td><td>李</td><td>60</td></tr> <tr><td>五</td><td>王</td><td>42</td></tr> <tr><td>六</td><td>赵</td><td>62</td></tr> </table> </body> </html>