写了几种特例
像这种不规则表格,一般按列最多的那个标准走,比如我的最长是六列,那我就按6走
cellpadding="0"意思是table表格的单元格子的内容与单元格子四边边界之间空白距离为0像素。
cellspacing="0"意思是table表格中的单元格子之间的空白距离为0像素。
colspan 占tr一行的多少
<table border="1" cellspacing="0" cellpadding="0" style="width: 1100px"> <tr> <td colspan="6" style="font-weight: bold">基本信息</td> </tr> <tr> <td colspan="3" style="border-right: none"> 检测机构名称:广西东方红你感冒 </td> <td colspan="3" style="border-left: none; text-align: right; padding-right: 10px" > 检测编号:02 </td> </tr> <tr> <td colspan="6" style="font-weight: bold">外观检验</td> </tr> <tr> <td colspan="3" class="text-center">325436</td> <td class="text-center">号牌号码</td> <td class="text-center">越B562489</td> <td class="text-center">车辆型号</td> </tr> <tr> <td colspan="1.5">外观检测结果</td> <td colspan="2"> <input type="checkbox" checked />合格 <input type="checkbox" />不合格 </td> <td colspan="3">检验员:</td> </tr> </table >
希望对大家有所帮助