显示边框
#uTable,#uTable tr th,#uTable tr td{
border: 2px solid #ccc;
}
//设置列
<colgroup span=3>
<col width="2%"></col>'
<col width="3%"></col>'
<col width="45%"></col>'
<col width="50%"></col>'
</colgroup>'
合并列:
colspan属性,例如:
<td colspan="2">注意事项</td> //合并两个列
合并行:
<td rowspan="2">注意事项</td> //合并两行
固定列宽:
列宽由表格宽度和列宽度设定
#uTable{
table-layout: fixed;
}
配合table-layout: fixed;属性来设置列宽
<colgroup>
<col width="100"> //设置每一列的样式
<col width="100">
<col width="50">
<col width="50">
</colgroup>