| 第1行 | 第1行 | 第1行 | 第1行 | 第1行 |
| 第2行 | 第2行 | 第2行 | 第2行 | 第2行 |
| 第3行 | 第3行 | 第3行 | 第3行 | 第3行 |
| 第4行 | 第4行 | 第4行 | 第4行 | 第4行 |
table tr:nth-child(odd){background:#CCC}/*定义奇数行的背景色为灰*/
table tr:nth-child(even){background:#F00}/*定义偶数行的背景色为红*/
table tr:hover{background:#0F0}/*鼠标滑过时所有行背景色变成蓝*/
table tr:hover:nth-child(odd){background:#00F}/*鼠标滑过时,第奇数行背景色变成蓝*/
table tr:nth-child(2){background:orange}/*第二行定义为桔色*/