自强学堂
自强学堂:学习、分享、让你更强!
XSL-FO 教程HTMLCSSJAVASCRIPTJQUERYSQLPHPBOOTSTRAPANGULARXML
 

XSL-FO block 对象

XSL-FO 参考手册 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]
azimuth keep-together
background-attachment keep-with-next
background-color keep-with-previous
background-image language
background-repeat last-line-end-indent
background-position-horizontal left
background-position-vertical linefeed-treatment
border-after-color line-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-width padding-after
border-end-color padding-before
border-end-style padding-bottom
border-end-width padding-end
border-left-color padding-left
border-left-style padding-right
border-left-width padding-start
border-right-color padding-top
border-right-style pause-after
border-right-width pause-before
border-start-color pitch
border-start-style pitch-range
border-start-width play-during
border-top-color relative-position
border-top-style richness
border-top-width right
bottom role
break-after script
break-before source-document
color space-after
country space-before
cue-after span
cue-before speak
elevation speak-header
end-indent speak-numeral
font-familyspeak-punctuation
font-selection-strategyspeech-rate
font-sizestart-indent
font-size-adjuststress
font-stretchtext-align
font-styletext-align-last
font-variant text-altitude
font-weight text-depth
hyphenatetext-indent
hyphenation-charactertop
hyphenation-keep visibility
hyphenation-ladder-count voice-family
hyphenation-push-character-countvolume
hyphenation-remain-character-countwhite-space-collapse
id white-space-treatment
intrusion-displace widows
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">
自强学堂
</fo:block>

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

结果:


自强学堂

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




XSL-FO 参考手册 XSL-FO 参考手册