HTML: <thead> charoff 属性

由网友 大卫 发布 阅读 6

HTML: <thead> charoff 属性

<thead> charoff属性设置 <thead>元素内的内容将从char属性指定的字符开始对齐的字符数,只有在指定了char属性并且align属性设置为“ char”的情况下,才能使用charoff属性。

 HTML <thead> 标签

在线示例

将<thead>内的内容与“B”字符右边的两个字符对齐:

<table style="width:100%;" border="1">
  <thead align="char" char="B" charoff="2">
  <tr>
    <th height="50">Babi娃娃制造商</th>
    <th height="50">Babi娃娃类型</th>
  </tr>
  </thead>
  <tr>
    <td>芭比公主</td>
    <td>6关节芭比娃娃</td>
  </tr>
  <tr>
    <td>芭比公主</td>
    <td>12关节芭比娃娃</td>
  </tr>
</table>
测试看看 ‹/›

浏览器兼容性

IEFirefoxOperaChromeSafari

几乎所有的主流浏览器都不支持 charoff 属性。

定义和用法

HTML5 不支持 <thead> charoff 属性。

charoff属性设置<thead>元素内的内容将从char属性指定的字符开始对齐的字符数。
只有在指定了char属性并且align属性设置为“ char”的情况下,才能使用charoff属性。

语法

<thead charoff="number">

属性值

描述
number指定对齐方式。
正数指定向字符的右边对齐。
负数指定向字符的左边对齐。
 HTML <thead> 标签

HTML: <textarea> required 属性 HTML: <thead> align 属性