HTML <thead> charoff 屬性
實例
把 <thead> 元素中的內容與字元 "M" 向右兩個字元的位置對齊:
<table border="1"
width="100%">
<thead align="char" char="M" charoff="2">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
<thead align="char" char="M" charoff="2">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
</thead>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
流覽器支持
幾乎所有的主流流覽器都不支持 charoff 屬性。
定義和用法
HTML5 不支持 <thead> charoff 屬性。
charoff 屬性規定 <thead> 元素中的內容相對於由 char 屬性規定的字元的對齊偏移量。
僅當 align 屬性設置為 "char" 且已設置 char 屬性時,才能使用 charoff 屬性。
語法
<thead charoff="number">
屬性值
值 | 描述 |
---|---|
number | 規定對齊方式。 正數規定向字元的右邊對齊。 負數規定向字元的左邊對齊。 |
