<html>
<head>
<title>表格边框的隐藏</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
body {
font-family: "宋体";
font-size: 12px;
margin-top: 4;
}
.t {
border: #3399ff;
border-style: solid;
border-width: 1px;
BORDER-COLLAPSE: collapse
}
td {
font-family: "Tahoma", "MS Shell Dlg";
font-size: 12px
}
textarea {
border: 1 solid
}
</style>
</head>
<body >
<center>
<table width="600" border="0" cellspacing="0" cellpadding="0"
height="30">
<tr>
<td>
<b>表格边框的隐藏</b>
</td>
</tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="8"
class="t">
<tr>
<td>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" border="1" width="200" cellpadding="0" cellspacing="0">
<tr align="center">
<td>
普
</td>
<td>
表
</td>
</tr>
<tr align="center">
<td>
通
</td>
<td>
格
</td>
</tr>
</table>
</td>
<td>
这是一普通的表格
</td>
</tr>
<tr>
<td>
<br>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" width="200" border="1" cellspacing="0" cellpadding="0"
frame=above>
<tr align="center">
<td>
头
</td>
<td>
上
</td>
</tr>
<tr align="center">
<td>
有
</td>
<td>
天
</td>
</tr>
</table>
<br>
</td>
<td>
只显示上边框
</td>
</tr>
<tr>
<td>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" width="200" border="1" cellspacing="0" cellpadding="0"
frame=below>
<tr>
<td align="center">
脚
</td>
<td align="center">
下
</td>
</tr>
<tr>
<td align="center">
有
</td>
<td align="center">
地
</td>
</tr>
</table>
</td>
<td>
只显示下边框
</td>
</tr>
<tr>
<td>
<br>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" width="200" border="1" cellspacing="0" cellpadding="0"
frame=vsides>
<tr>
<td align="center">
上不着天
</td>
<td>
</td>
</tr>
<tr>
<td>
</td>
<td align="center">
下不着地
</td>
</tr>
</table>
<br>
</td>
<td>
只显示左、右边框
</td>
</tr>
<tr>
<td>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" border="1" cellspacing="0" cellpadding="0" frame=hsides
width="200">
<tr>
<td align="center">
去掉两边
</td>
<td></td>
</tr>
<tr>
<td></td>
<td align="center">
只剩“王”字
</td>
</tr>
</table>
</td>
<td>
只显示上、下边框
</td>
</tr>
<tr>
<td>
<br>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" width="200" border="1" cellspacing="0" cellpadding="0"
frame=lhs>
<tr>
<td width="100" align="center">
只
</td>
<td width="100" align="center">
有
</td>
</tr>
<tr>
<td align="center">
左
</td>
<td align="center">
边
</td>
</tr>
</table>
<br>
</td>
<td>
只显示左边框
</td>
</tr>
<tr>
<td>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" width="200" border="1" cellspacing="0" cellpadding="0"
frame=rhs>
<tr>
<td width="100" align="center">
只
</td>
<td width="100" align="center">
有
</td>
</tr>
<tr>
<td align="center">
右
</td>
<td align="center">
边
</td>
</tr>
</table>
</td>
<td>
只显示右边框
</td>
</tr>
<tr>
<td>
<br>
<table style="BORDER-COLLAPSE: collapse" borderColor="#3399ff" width="200" border="1" cellspacing="0" cellpadding="0"
frame=void>
<tr>
<td align="center">
四周
</td>
<td align="center">
去掉
</td>
</tr>
<tr>
<td align="center">
只留
</td>
<td align="center">
中间
</td>
</tr>
</table>
</td>
<td>
不显示任何边框
</td>
</tr>
<tr>
<td colspan="2">
<hr size="1" color="#3399ff">
表格边框的显示与隐藏,是可以用frame参数来控制的。请注意它只控制表格的边框图,而不影晌单元格。
<br>
只显示上边框 <table frame=above>
<br>
只显示下边框 <table frame=below>
<br>
只显示左、右边框 <table frame=vsides>
<br>
只显示上、下边框 <table frame=hsides>
<br>
只显示左边框 <table frame=lhs>
<br>
只显示右边框 <table frame=rhs>
<br>
不显示任何边框 <table frame=void>
</td>
</tr>
</table>
</center>
</body>
</html>