JSRUN 用代码说话

block 对象

编辑教程

block 对象

本节介绍的是 XSL-FO 中的 block 对象,你将了解该对象的定义、语法以及属性。

定义和用法

<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]d 属性 [K-Z]
azimuth keep-together
background-attachment keep-with-next
background-colord keep-with-previous
background-imaged language
background-repeat last-line-end-indent
background-position-horizontal left
background-position-verticald linefeed-treatment
border-after-color line-height
border-after-style line-height-shift-adjustment
border-after-width line-stacking-strategy
border-before-color margin-bottom
border-before-style margin-left
border-before-width margin-right
border-bottom-color margin-top
border-bottom-style orphans
border-bottom-width padding-after
border-end-colord padding-before
border-end-styled padding-bottom
border-end-widthd 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-colord relative-position
border-top-styled richness
border-top-widthd right
bottom role
break-after script
break-befored source-document
color space-after
country space-before
cue-after span
cue-before speak
elevation speak-header
end-indent speak-numeral
font-family speak-punctuation
font-selection-strategy speech-rate
font-size start-indent
font-size-adjustd stress
font-stretchd text-align
font-style text-align-last
font-variantd text-altitude
font-weight text-depth
hyphenate text-indent
hyphenation-character top
hyphenation-keepd visibility
hyphenation-ladder-countd voice-family
hyphenation-push-character-countd volume
hyphenation-remain-character-count white-space-collapse
id white-space-treatment
intrusion-displace widows
d 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">
jsrun
</fo:block>

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

结果:


jsrun

At jsrun you will find all the Web-building tutorials you need, from basic HTML and XHTML to advanced XML, XSL, Multimedia and WAP.
JSRUN闪电教程系统是国内最先开创的教程维护系统, 所有工程师都可以参与共同维护的闪电教程,让知识的积累变得统一完整、自成体系。 大家可以一起参与进共编,让零散的知识点帮助更多的人。
X
支付宝
9.99
无法付款,请点击这里
金额: 0
备注:
转账时请填写正确的金额和备注信息,到账由人工处理,可能需要较长时间
如有疑问请联系QQ:565830900
正在生成二维码, 此过程可能需要15秒钟