最新的Web开发教程
 

HTML <col> charoff Attribute

<HTML <col>标签

在下面的例子中,第二列的内容被从对准的两个字符向右"." 字符:

<table style="width:100%">
  <col align="left">
  <col align="char" char="." charoff="2">
  <tr>
    <th>Month</th>
    <th>Savings</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100.00</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$10.00</td>
  </tr>
</table>
试一试»

定义和用法

<col> charoff属性不是HTML5的支持。

所述charoff属性设置字符的内容将从由指定的字符对齐的数量char属性。

charoff如果只能用属性char指定的属性和所述align属性被设置为"char"


浏览器支持

属性
charoff 不支持 不支持 不支持 不支持 不支持

句法

<col charoff="number">

属性值

描述
number 指定的对准。
正数指定字符的右对齐。
负数指定到字符的左侧对齐。

<HTML <col>标签