2016-11-20
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <style> tr:nth-child(odd){ background-color: pink; } tr:nth-child(even){ background-color: #f0f0f0; } tr:hover{ background-color: yellow; } tr{ transition:all 1s; } table{ text-align: center; } </style> <title>颜色轮换练习</title> </head> <body> <table width="400" align="center" border="1" rules="all"> <caption><b>学生信息</b></caption> <tr> <th>序号</th> <th>姓名</th> <th>年龄</th> </tr> <tr> <td>1</td> <td>张三</td> <td>18</td> </tr> <tr> <td>2</td> <td>李四</td> <td>20</td> </tr> <tr> <td>3</td> <td>王五</td> <td>21</td> </tr> <tr> <td>4</td> <td>老宋</td> <td>28</td> </tr> <tr> <td>5</td> <td>老徐</td> <td>100</td> </tr> </table> </body> </html>
换颜色,准备做个换图片的