练习和熟悉下表格的操作,效果如图:
简易课程表Html代码:
<body>
<table>
<tr class="morning">
<tr class="days">
<td> </td>
<td>星期一</td>
<td>星期二</td>
<td>星期三</td>
<td>星期四</td>
<td>星期五</td>
</tr>
<tr class="m1">
<td id="morning" rowspan="4"> 上午 </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="m2">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="m3">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="m4">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tr>
<tr class="noon">
<tr>
<td id="noon" colspan="6">午休</td>
</tr>
</tr>
<tr class="afternoon">
<tr class="a1">
<td id="afternoon" rowspan="3">下午</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="a2">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="a3">
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tr>
</table>
</body>
CSS部分:
table{
border-collapse: collapse;
}
td{
border: 1px black solid;
text-align:center;
}
网友评论