使用frame屬性可以控制表格邊框的樣式類型。
基本語法
<table frame="value">
語法解釋
value的取值如下表所示:
表格的邊框樣式
屬 性 值 | 描 述 |
above | 顯示上邊框 |
below | 顯示下邊框 |
border | 顯示上下左右邊框 |
box | 顯示上下左右邊框 |
hsides | 顯示上下邊框 |
lhs | 顯示左邊框 |
rhs | 顯示右邊框 |
void | 不顯示邊框 |
vsides | 顯示左右邊框 |
文件范例:10-12.htm
設(shè)定表格的邊框樣式。
01 <!-- ------------------------------ -->
02 <!-- 文件范例:10-12.htm -->
03 <!-- 文件說明:設(shè)定表格的邊框樣式 -->
04 <!-- ------------------------------ -->
05 <html>
06 <head>
07 <title>設(shè)定表格的邊框樣式</title>
08 </head>
09 <body>
10 <h1>主流的網(wǎng)頁設(shè)計(jì)軟件</h1>
11 <table border=3 width=400 height=100 bordercolor=#336699 cellspacing=10 cellpadding=25 align="center" frame=vsides>
12 <tr>
13 <td>網(wǎng)頁圖像軟件</td><td>fireworks</td>
14 </tr>
15 <tr>
16 <td>網(wǎng)頁制作軟件</td><td>dreamweaver</td>
17 </tr>
18 <tr>
19 <td>網(wǎng)頁動(dòng)畫軟件</td><td>flash</td>
20 </tr>
21 </table>
22 </body>
23 </html>
文件說明
第11行定義了表格的邊框樣式為只顯示左右邊框。
新聞熱點(diǎn)
疑難解答