表格進階
表格的色彩
表元的背景色彩和背景圖象 <th bgcolor=#> <th background="URL">注;只能用于IE - #=rrggbb 16 進制 RGB 數(shù)碼, 或者是下列預(yù)定義色彩名稱:
Black, Olive, Teal, Red, Blue, Maroon, Navy, Gray, Lime, Fuchsia, White, Green, Purple, Silver, Yellow, Aqua 代碼如下 <table border>
<tr><th bgcolor=Yellow>黃色</th>
<th bgcolor=Red>紅色</th>
<th rowspan=2 background="http://image51.360doc.com/DownloadImg/2012/05/0519/23748591_9.gif">.gif</th>
<tr bgcolor=white><td>A</td><td>B</td>
</table>
例式 表格邊框的色彩 注;只能用于IE <table bordercolor=#>代碼如下 <table cellspacing=5 border=5 bodercolor=#ffaa00>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>
例式 表格邊框色彩的亮度控制 注;只能用于IE <table bordercolorlight=#> <table bordercolordark=#> 代碼如下 <table cellspacing=5 border=5
bordercolorlight=White bordercolordark=Maroon>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
<tr><td>A</td><td>B</td><td>C</td>
</table>
例式 表格的分組顯示 注;只能用于IE
按行分組
<thead> ... </thead> - 表的題頭
<tbody> ... </tbody> - 表的正文
<tfoot> ... </tfoot> - 表的腳注
代碼如下
<table border>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
按列分組
<colgroup align=#> #=left, right, center
代碼如下
<table border width=160>
<colgroup align=left>
<colgroup align=center>
<colgroup align=right>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>左</td><td>中</td><td>右</td>
<tr><td>左</td><td>中</td><td>右</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
左 | 中 | 右 | 左 | 中 | 右 |
列的屬性控制
<col span=#> #=從左數(shù)起,具有指定屬性的列的列數(shù)
<col align=#> #=left, right, center
代碼如下
<table border width=160>
<colgroup>
<col align=center span=2>
<colgroup align=right>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
表格中邊框的顯示 注;只能用于IE
顯示所有 4 個邊框 <table frame=box>
代碼如下
<table border frame=box>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
只顯示上邊框 <table frame=above>
代碼如下
<table border frame=above>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
只顯示下邊框 <table frame=below>
代碼如下
<table border frame=above>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
只顯示上、下邊框 <table frame=hsides>
代碼如下
<table border frame=hsides>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
只顯示左、右邊框 <table frame=vsides>
代碼如下
<table border frame=vsides>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
只顯示左邊框 <table frame=lhs>
代碼如下
<table border frame=above>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
只顯示右邊框 <table frame=rhs>
代碼如下
<table border frame=rhs>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
不顯示任何邊框 <table frame=void>
代碼如下
<table border frame=void>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F |
表格中分隔線的顯示 注;只能用于IE
顯示所有分隔線 <table rules=all>
代碼如下
<table border rules=all>
<colgroup><col align=center span=2>
<colgroup align=right>
<thead>
<tr><th>Food</th><th>Drink</th><th>Sweet</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
<tbody>
<tr><td rowspan=3 align=right>文字內(nèi)容</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F | 文字內(nèi)容 |
只顯示組(Groups)與組之間的分隔線 <table rules=groups>
代碼如下
<table border frame=groups>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
<tr><td rowspan=3 align=right>文字內(nèi)容</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F | 文字內(nèi)容 |
只顯示行與行之間的分隔線 <table rules=rows>
代碼如下
<table border frame=rows>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table><
<tr><td rowspan=3 align=right>文字內(nèi)容</td>
</tbody>
</table>/PRE>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F | 文字內(nèi)容 |
只顯示列與列之間的分隔線 <table rules=cols>
代碼如下
<table border frame=cols>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
<tr><td rowspan=3 align=right>文字內(nèi)容</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F | 文字內(nèi)容 |
不顯示任何分隔線 <table rules=none>
代碼如下
<table border frame=none>
<thead>
<tr><th>內(nèi)容</th><th>內(nèi)容</th><th>內(nèi)容</th>
</thead>
<tbody>
<tr><td>A</td><td>B</td><td>C</td>
<tr><td>D</td><td>E</td><td>F</td>
</tbody>
</table>
<tr><td rowspan=3 align=right>文字內(nèi)容</td>
</tbody>
</table>
例式
內(nèi)容 | 內(nèi)容 | 內(nèi)容 |
---|
A | B | C | D | E | F | 文字內(nèi)容 |
字體★★★★標記
美術(shù)字體
常用"段落屬性"<p align="left>"左對齊段落。<p align="center">居中段落。<p align="right">右對齊段落。<BR>換行符 常用"基本屬性"FONT-SIZE: 30pt;=30pt字體大小數(shù)值越大字體越大 FILTER: shadow(color=#af2dco);=#af2dco字體陰影色彩 (color=#FF8080, strength=20)20=陰影的長短 左邊帶彩影的字體代碼如下: <p align="left><FONT style="FONT-SIZE: 30pt; FILTER: shadow(color=#af2dco); WIDTH: 100%; COLOR: #730404; LINE-HEIGHT: 100%; FONT-FAMILY: 華文行楷">朋友您好</FONT> 示例 朋友您好 左邊帶長影的字體代碼如下: <P align=center><DIV style="FILTER: shadow(color=#FF8080, strength=20); WIDTH: 100%;"><FONT face=華文新魏 color=#FF0000 size=7> <CENTER>朋友您好</CENTER> <P></P></DIV> 示例 帶邊影的字體代碼如下: <FONT style="FONT-SIZE: 30pt; FILTER: glow(color=#FF80FF,strength=8); WIDTH: 100%; COLOR:#FF0066; LINE-HEIGHT: 150%; FONT-FAMILY: 華文新魏"> <p align=right>朋友您好</FONT> 示例 朋友您好 右邊影的字體代碼如下: <FONT style="FONT-WEIGHT: bolder; FONT-SIZE: 40px; FILTER: blur(add=1, direction=45,strength=10); WIDTH: 100%; POSITION: relative; HEIGHT: 165px" color=#3333cc> 朋友您好</FONT> 示例 朋友您好 彩色閃動的字體代碼如下: <TABLE cellSpacing=0 cellPadding=0 background=http://dnd0756./domName/dnd0756/200682316375174734.gif><TD style="FILTER: chroma(color=#336699)"><TABLE align=center bgColor=#ABE4EF><TD align=middle><FONT style="FONT-SIZE:30pt"face=華文行楷 color=#336699><B>山林 ~~歡迎您的光臨!</B></FONT></TABLE></TABLE> 示例 自定義彩色字體代碼如下: <FONT size=6><FONT color=#ff0000>您</FONT><FONT color=#ECEC00>好</FONT><FONT color=#00FFFF>歡</FONT><FONT color=#FF0080>迎</FONT>FONT color=#990066>您</FONT><FONT color=#9900FF>的<<FONT color=#FF71FF>光</FONT><FONT color=#00DB00>臨</FONT></FONT>
示例 歡迎您的光臨 |
|