XSL-FO list-block 對(duì)象

2018-02-23 10:15 更新

XSL-FO list-block 對(duì)象

XSL-FO 參考手冊(cè) XSL-FO 參考手冊(cè)

定義和用法

<fo:list-block> 對(duì)象用于格式化整個(gè)列表。

下面列舉了四個(gè)用于創(chuàng)建列表的 XSL-FO 對(duì)象:

  • fo:list-block(包含了整個(gè)列表)
  • fo:list-item(包含了列表中的每個(gè)項(xiàng))
  • fo:list-item-label(包含了 list-item 標(biāo)簽 - 通常情況下,<fo:block> 包含數(shù)字、字符等)
  • fo:list-item-body(包含了 list-item 的內(nèi)容/主體 - 通常是一個(gè)或多個(gè) <fo:block> 對(duì)象)

語法

<fo:list-block>
<!--
Contents:(list-item+)
-->
</fo:list-block> 

屬性

屬性 [A-J] 屬性 [K-Z]
azimuth keep-together
background-attachment keep-with-next
background-color keep-with-previous
background-image left
background-repeat margin-bottom
background-position-horizontal margin-left
background-position-vertical margin-right
border-after-color margin-top
border-after-style padding-after
border-after-width padding-before
border-before-color padding-bottom
border-before-style padding-end
border-before-width padding-left
border-bottom-color padding-right
border-bottom-style padding-start
border-bottom-width padding-top
border-end-color pause-after
border-end-style pause-before
border-end-width pitch
border-left-color pitch-range
border-left-style play-during
border-left-width provisional-distance-between-starts
border-right-color provisional-label-separation
border-right-style relative-position
border-right-width richness
border-start-color right
border-start-style role
border-start-width source-document
border-top-color space-after
border-top-style space-before
border-top-width speak
bottom speak-header
break-after speak-numeral
break-before speak-punctuation
cue-after speech-rate
cue-before start-indent
elevation stress
end-indent top
id voice-family
intrusion-displace volume

實(shí)例 1

一個(gè) XSL-FO 列表實(shí)例:

<fo:list-block>

<fo:list-item>
<fo:list-item-label>
<fo:block>*</fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block>Volvo</fo:block>
</fo:list-item-body>
</fo:list-item>

<fo:list-item>
<fo:list-item-label>
<fo:block>*</fo:block>
</fo:list-item-label>
<fo:list-item-body>
<fo:block>Saab</fo:block>
</fo:list-item-body>
</fo:list-item>

</fo:list-block>

上面代碼將輸出:


* Volvo
* Saab


XSL-FO 參考手冊(cè) XSL-FO 參考手冊(cè)
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)