Definition and Usage
定义和用法
The <fo:table-caption> object contains the caption for the table when using the <fo:table-and-caption> object.
<fo:table-caption>对象包含了使用<fo:table-and-caption>对象定义的所有表格标题。
Syntax
语法
<fo:table-caption> <!-- Contents:(block|block-container| list-block)+ --> </fo:table-caption> |
Properties
属性
Example 1
案例1
A simple table:
一张简单的表格:
<fo:table-and-caption> <fo:table-caption> <fo:block>Caption for this table</fo:block> </fo:table-caption> <fo:table> <fo:table-column column-width="25mm"/> <fo:table-column column-width="25mm"/>
<fo:table-header> <fo:table-cell> <fo:block font-weight="bold">Car</fo:block> </fo:table-cell> <fo:table-cell> <fo:block font-weight="bold">Price</fo:block> </fo:table-cell> </fo:table-header>
<fo:table-body> <fo:table-row> <fo:table-cell> <fo:block>Volvo</fo:block> </fo:table-cell> <fo:table-cell> <fo:block>$50000</fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block>SAAB</fo:block> </fo:table-cell> <fo:table-cell> <fo:block>$48000</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body>
</fo:table> </fo:table-and-caption> |
The output from this code would something like this:
上述代码将输出下面的结果:
Caption for this table
Car | Price |
Volvo | $50000 |
SAAB | $48000 |