HTML thead charoff 屬性

2018-08-04 20:28 更新

HTML <thead> charoff 屬性

HTML thead 標(biāo)簽參考手冊 HTML <thead> 標(biāo)簽

實例

把 <thead> 元素中的內(nèi)容與字符 "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>

嘗試一下 ?

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

幾乎所有的主流瀏覽器都不支持 charoff 屬性。


定義和用法

HTML5 不支持 <thead> charoff 屬性。

charoff 屬性規(guī)定 <thead> 元素中的內(nèi)容相對于由 char 屬性規(guī)定的字符的對齊偏移量。

僅當(dāng) align 屬性設(shè)置為 "char" 且已設(shè)置 char 屬性時,才能使用 charoff 屬性。


語法

<thead charoff="number">

屬性值

描述
number 規(guī)定對齊方式。
正數(shù)規(guī)定向字符的右邊對齊。
負(fù)數(shù)規(guī)定向字符的左邊對齊。


HTML thead 標(biāo)簽參考手冊 HTML <thead> 標(biāo)簽
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號