DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> HTML基礎知識 >> HTML和Xhtml >> HTML table表格邊框的控制詳細說明
HTML table表格邊框的控制詳細說明
編輯:HTML和Xhtml      日期:2016/12/23 10:15:26
只顯示上邊框 <table frame=above>
只顯示下邊框 <table frame=below>
只顯示左、右邊框 <table frame=vsides>
只顯示上、下邊框 <table frame=hsides>
只顯示左邊框 <table frame=lhs>
只顯示右邊框 <table frame=rhs>
不顯示任何邊框 <table frame=void>

復制代碼代碼如下:
<html>
<head>
<title>表格邊框的隱藏</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body { color:"#ffffff";
font-family: "宋體";
font-size: 12px;
margin-top : 4;
}
.t {
border: #000000; border-style: solid; border-width: 1px
}
td {
font-family: "Tahoma", "MS Shell Dlg"; font-size: 12px
}
textarea {border: 1 solid #000000"}
</style>
</head>
<body bgcolor="#999999" text="#000000">
<center>
<table width="600" border="0" cellspacing="0" cellpadding="8" class="t">
<tr>
<td>
<table 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>

<table 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>

</td>
<td>只顯示上邊框</td>
</tr>
<tr>
<td>
<table 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>

<table width="200" border="1" cellspacing="0" cellpadding="0" frame=vsides>
<tr>
<td align="center">上不著天</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="center">下不著地</td>
</tr>
</table>

</td>
<td>只顯示左、右邊框</td>
</tr>
<tr>
<td>
<table 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>

<table 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>

</td>
<td>只顯示左邊框</td>
</tr>
<tr>
<td>
<table 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>

<table 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=black>
表格邊框的顯示與隱藏,是可以用frame參數來控制的。請注意它只控制表格的邊框圖,而不影晌單元格。

只顯示上邊框 &lt;table frame=above&gt;

只顯示下邊框 &lt;table frame=below&gt;

只顯示左、右邊框 &lt;table frame=vsides&gt;

只顯示上、下邊框 &lt;table frame=hsides&gt;

只顯示左邊框 &lt;table frame=lhs&gt;

只顯示右邊框 &lt;table frame=rhs&gt;

不顯示任何邊框 &lt;table frame=void&gt;</td>
</tr>
</table>
</center>
</body>
</html>
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved