当前位置: 代码迷 >> Web前端 >> 二种方式制作细表格
  详细解决方案

二种方式制作细表格

热度:24   发布时间:2012-10-06 17:34:01.0
2种方式制作细表格

1.设置表格边框为0,单元格间距为1px,表格背景颜色为黑色,单元格背景颜色为白色。

<table width="799" border="0" bgcolor="#000000" cellspacing="1" cellpadding="0">
? <caption align="top">
??? 细表格
? </caption>
? <tr bgcolor="#FFFFFF">
??? <td width="65">&nbsp;</td>
??? <td width="65">&nbsp;</td>
??? <td width="65">&nbsp;</td>
??? <td width="65">&nbsp;</td>
??? <td width="65">&nbsp;</td>
??? <td width="65">&nbsp;</td>
??? <td width="65">&nbsp;</td>
??? <td width="65">&nbsp;</td>
??? <td width="269">&nbsp;</td>
? </tr>
? <tr bgcolor="#FFFFFF">
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
? </tr>
? <tr bgcolor="#FFFFFF">
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
? </tr>
</table>

2.设置表格边框为1px,,单元格间距和边距为0。

<table width="799"? border="1" bordercolor="black" bordercolordark="white" bordercolorlight="black" cellpadding="0" cellspacing="0">
? <caption align="top">
??? 打印单
? </caption>
? <tr>
??? <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>
? </tr>
?? <tr>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
??? <td>&nbsp;</td>
? </tr>
</table>

  相关解决方案