runoops.com

XSL-FO block 对象

XSL-FO 参考手册

定义和用法

<fo:block> 对象定义一个输出块。块是矩形框中的输出序列。

<fo:block> 对象用于格式化段落、标题、大字标题,等等。

语法

<fo:block>
  <!--
    Contents:(#PCDATA|bidi-override|character|
    external-graphic|instream-foreign-object|
    inline|inline-container|leader|page-number|
    page-number-citation|basic-link|multi-toggle|
    block|block-container|table-and-caption|
    table|list-block)*
  -->
</fo:block>

属性

属性 [A-J]属性 [K-Z]
azimuthkeep-together
background-attachmentkeep-with-next
background-colorkeep-with-previous
background-imagelanguage
background-repeatlast-line-end-indent
background-position-horizontalleft
background-position-verticallinefeed-treatment
border-after-colorline-height
border-after-styleline-height-shift-adjustment
border-after-widthline-stacking-strategy
border-before-colormargin-bottom
border-before-stylemargin-left
border-before-widthmargin-right
border-bottom-colormargin-top
border-bottom-styleorphans
border-bottom-widthpadding-after
border-end-colorpadding-before
border-end-stylepadding-bottom
border-end-widthpadding-end
border-left-colorpadding-left
border-left-stylepadding-right
border-left-widthpadding-start
border-right-colorpadding-top
border-right-stylepause-after
border-right-widthpause-before
border-start-colorpitch
border-start-stylepitch-range
border-start-widthplay-during
border-top-colorrelative-position
border-top-stylerichness
border-top-widthright
bottomrole
break-afterscript
break-beforesource-document
colorspace-after
countryspace-before
cue-afterspan
cue-beforespeak
elevationspeak-header
end-indentspeak-numeral
font-familyspeak-punctuation
font-selection-strategyspeech-rate
font-sizestart-indent
font-size-adjuststress
font-stretchtext-align
font-styletext-align-last
font-varianttext-altitude
font-weighttext-depth
hyphenatetext-indent
hyphenation-charactertop
hyphenation-keepvisibility
hyphenation-ladder-countvoice-family
hyphenation-push-character-countvolume
hyphenation-remain-character-countwhite-space-collapse
idwhite-space-treatment
intrusion-displacewidows
 wrap-option

实例 1

块是矩形框中的输出序列:

<fo:block
  border-width="1mm">
This block of output will have a one millimeter border around it.
</fo:block>

实例 2

块是可独立样式化的输出序列:

<fo:block
  font-size="12pt"
  font-family="sans-serif">
This block of output will be written in a 12pt sans-serif font.
</fo:block>

实例 3

<fo:block
  font-size="14pt" font-family="verdana" color="red"
  space-before="5mm" space-after="5mm">
RUNOOPS
</fo:block>
<fo:block
  text-indent="5mm"
  font-family="verdana" font-size="12pt"
  space-before="5mm" space-after="5mm">
At RUNOOPS you will find all the Web-building tutorials you
need, from basic HTML and XHTML to advanced XML, XSL, Multimedia
and WAP.
</fo:block>

结果:


RUNOOPS

At RUNOOPS you will find all the Web-building
tutorials you need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.

 


XSL-FO 参考手册