方法一:
使用1*1的圖片,來填充單元格背景,并設置單元格的寬度,高度為1px
第二種:
<html>
<body>
<table width="200" height="100" border="1" bordercolor="red" cellspacing="0">
<tr>
<td></td><!--單元格中不要插入任何東東-->
</tr>
</table>
</body>
</html>
第三種:利用二級表格
<table width="200" height="100" border="0" bgcolor="red" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle">
<table width="198" height="98" bgcolor="white" border="0">
<tr>
<td>www.blueidea.com</td>
</tr>
</table>
</td>
</tr>
</table>
第四種:利用單元格背景填充
<table width="200" height="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="1" bgcolor="red"></td>
</tr>
<tr>
<td width="1" bgcolor="green"></td><td width="198" height="98">www.blueidea.com</td><td width="1" bgcolor="blue"></td>
</tr>
<tr>
<td colspan="3" height="1" bgcolor="orchid"></td>
</tr>
</table>
第五種:利用亮邊框和暗邊框
<table width="200" height="100" border="1" bordercolorlight="red" bordercolordark="white"
cellpadding="0" cellspacing="0">
<tr>
<td>www.blueidea.com</td><td>www.blueidea.com</td>
</tr>
</table>
第六種:利用單元格的間距
<table width="200" height="100" border="0" bgcolor="red"
cellpadding="0" cellspacing="1">
<tr>
<td bgcolor="white">www.blueidea.com</td><td bgcolor="white">www.blueidea.com</td>
</tr>
</table>
第七種:利用collapse
<table width="200" height="100" border="1" bordercolor="blue" cellspacing="0" style="border-collapse:collapse">
<tr>
<td>www.blueidea.com</td><td>www.blueidea.com</td>
</tr>
</table>
第八種:利用border
<table width="200" height="100" border="0" style="border:1px red solid">
<tr>
<td>www.blueidea.com</td><td>www.blueidea.com</td>
</tr>
</table>
style="border-collapse:collapse" 這句什么意思?
collapse相鄰的邊被合并
使用1*1的圖片,來填充單元格背景,并設置單元格的寬度,高度為1px
第二種:
<html>
<body>
<table width="200" height="100" border="1" bordercolor="red" cellspacing="0">
<tr>
<td></td><!--單元格中不要插入任何東東-->
</tr>
</table>
</body>
</html>
第三種:利用二級表格
<table width="200" height="100" border="0" bgcolor="red" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle">
<table width="198" height="98" bgcolor="white" border="0">
<tr>
<td>www.blueidea.com</td>
</tr>
</table>
</td>
</tr>
</table>
第四種:利用單元格背景填充
<table width="200" height="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="1" bgcolor="red"></td>
</tr>
<tr>
<td width="1" bgcolor="green"></td><td width="198" height="98">www.blueidea.com</td><td width="1" bgcolor="blue"></td>
</tr>
<tr>
<td colspan="3" height="1" bgcolor="orchid"></td>
</tr>
</table>
第五種:利用亮邊框和暗邊框
<table width="200" height="100" border="1" bordercolorlight="red" bordercolordark="white"
cellpadding="0" cellspacing="0">
<tr>
<td>www.blueidea.com</td><td>www.blueidea.com</td>
</tr>
</table>
第六種:利用單元格的間距
<table width="200" height="100" border="0" bgcolor="red"
cellpadding="0" cellspacing="1">
<tr>
<td bgcolor="white">www.blueidea.com</td><td bgcolor="white">www.blueidea.com</td>
</tr>
</table>
第七種:利用collapse
<table width="200" height="100" border="1" bordercolor="blue" cellspacing="0" style="border-collapse:collapse">
<tr>
<td>www.blueidea.com</td><td>www.blueidea.com</td>
</tr>
</table>
第八種:利用border
<table width="200" height="100" border="0" style="border:1px red solid">
<tr>
<td>www.blueidea.com</td><td>www.blueidea.com</td>
</tr>
</table>
style="border-collapse:collapse" 這句什么意思?
collapse相鄰的邊被合并