如何使用HTML这样制作复杂的表格

时间:2019-04-06 20:48:39

标签: html

您好,我在创建此复杂表格时遇到问题,有人可以帮我enter image description here

1 个答案:

答案 0 :(得分:1)

这可能会帮助您。

<style>
.rotate90deg{
    transform:rotate(-90deg);
    margin-bottom:18px;
}
</style>
<table width="100%" border="1" cellspacing="0" cellpadding="5">
    <tr>
        <td width="3%" height="55" valign="bottom">No.</td>
        <td width="5%" valign="bottom">Student's Name</td>
        <td width="5%" valign="bottom"><div class="rotate90deg">Semester</div></td>
        <td width="3%" valign="bottom">Age</td>
        <td width="3%" valign="bottom">Sex</td>
        <td width="4%" valign="bottom"><div class="rotate90deg">English</div></td>
        <td width="4%" valign="bottom"><div class="rotate90deg">Maths</div></td>
        <td width="73%" valign="bottom"></td>
    </tr>
    <tr>
        <td rowspan="3">&nbsp;</td>
        <td rowspan="3">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td rowspan="3">&nbsp;</td>
        <td rowspan="3">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td rowspan="3">&nbsp;</td>
        <td rowspan="3">&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
</table>