XML technologies / XSL-FO / Reference / Attributes in XSL-FO / z-index
(Excerpt from "XSL-FO ― Die Referenz" by Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Recommendation section: 7.30.18
Category: 7.30 Miscellaneous Properties
Description
This attribute defines the stacking order of overlapping elements. An element whose value for z-index is 3 is above one with value 2. Elements sharing a z-index value are displayed in the order in which they occur in the code.
Values
auto | With the default value auto, the element behaves as if z-index were 0, but no new stacking context is created and the element is placed at the bottom. |
Integer | a positive integer whose value determines the element’s position |
Inherited: | yes |
Default value: auto
XSL-FO version: 1.0
Allowed in:
Within block containers, you can group any number of Blocks. Attributes can specify the container’s desired position in the document. | |
This element marks the start of a "change region", which is ended by its matching fo:change-bar-end. The change region has a change bar running along either the start or end edge of the column. The change bar’s appearance is determined by the values of the corresponding properties. |
Support:
Conformance level | Antenna House | FOP | RenderX XEP | Altsoft XML2PDF | Compart DocBridge |
Extended | Y | N | Y | Y | Y |
XSL-FO example:
<fo:root font-family="Arial" font-size="10pt" line-height="1.2em">
<fo:layout-master-set>
<fo:simple-page-master master-name="Inhalt-Seiten" margin="0mm 0mm 0mm
0mm" page-height="297mm" page-width="210mm">
<fo:region-body margin="26mm 55mm 41mm
55mm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Inhalt-Seiten">
<fo:flow flow-name="xsl-region-body">
<fo:block-container background-color="#F38222" absolute-position="fixed" top="50mm" left="50mm" height="50mm" width="50mm" z-index="2">
<fo:block font-family="Arial Unicode MS">
z-index 2
</fo:block>
</fo:block-container>
<fo:block-container background-color="#4F491D" absolute-position="fixed" top="75mm" left="75mm" height="50mm" width="50mm" z-index="3">
<fo:block font-family="Arial Unicode MS">
z-index 3
</fo:block>
</fo:block-container>
<fo:block-container background-color="#999967" absolute-position="fixed" top="25mm" left="25mm" height="50mm" width="50mm" z-index="1">
<fo:block font-family="Arial Unicode MS">
z-index 1
</fo:block>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>In the output:
Excerpt from the W3C Recommendation: