<table>
<caption>
The cities I visited on my segway'n USA travels.
</caption>
<tr>
<th>City</th>
<th>Date</th>
<th>Temperature</th>
<th>Altitude</th>
<th>Population</th>
<th>Diner Rating</th>
</tr>
<tr>
<td class="center">Walla Walla,WA</td>
<td class="center">June 15th</td>
<td class="center">75</td>
<td class="right">1,204 ft</td>
<td class="right">29,686</td>
<td class="center">4/5</td>
</tr>
<tr>
<td class="center">Magic City,ID</td>
<td class="center">June 25th</td>
<td class="center">74</td>
<td class="right">5,312 ft</td>
<td class="right">50</td>
<td class="center">3/5</td>
</tr>
<tr>
<td class="center">Bountiful,UT</td>
<td class="center">July 10th</td>
<td class="center">91</td>
<td class="right">4,226 ft</td>
<td class="right">41,173</td>
<td class="center">4/5</td>
</tr>
<tr>
<td class="center">Last Chance,CO</td>
<td class="center">July 23rd</td>
<td class="center">102</td>
<td class="right">4,780 ft</td>
<td class="right">265</td>
<td class="center">3/5</td>
</tr>
<tr>
<td class="center" rowspan="2">Truth or Consequences,NM</td>
<td class="center">August 9th</td>
<td class="center">93</td>
<td class="right" rowspan="2">4,242 ft</td>
<td class="right" rowspan="2">7,289</td>
<td class="center">5/5</td>
</tr>
<tr><!--插入新行-->
<td class="center">August 27th</td>
<td class="center">98</td>
<td class="center">4/5</td>
</tr>
<tr>
<td class="center">Why,AZ</td>
<td class="center">August 18th</td>
<td class="center">104</td>
<td class="right">860 ft</td>
<td class="right">480</td>
<td class="center">3/5</td>
</tr>
</table>
td,th{
border:thin dotted gray;
padding: 5px;
}
table{
border: thin solid black;
margin: 0px 20px 0px 20px;
caption-side: bottom;
border-collapse: collapse;
}
caption{
font-style: italic;
padding-top: 8px;
}
td.center{
text-align: center;
}
td.right{
text-align: right;
}
tr:nth-child(odd){
background-color: #fcba7a;
}
th{
background-color: #cc6600;
}
HTML建立表格后,设置奇数行为橙色,在插入合并行后显示不正确,是我哪里处理不当吗?