【问题标题】:Apache FOP: zindex does not appear to be working in overlapping blocksApache FOP:zindex 似乎没有在重叠块中工作
【发布时间】:2011-04-14 08:15:26
【问题描述】:

我是 FOP 新手。我正在尝试使用块容器和 zindexes 在图像顶部显示文本。图像总是在顶部。如果我删除图像,我可以看到文字,所以文字在图像下方。

这是在表格单元格内。这是相关代码:

<fo:table-cell padding="0.000pt" text-align="left" display-align="before">
                <fo:block>
                  <fo:block-container z-index="2" position="absolute" left="0.913in" top="0.139in" width="0.946in" height="0.198in" overflow="hidden">
                    <fo:block><fo:inline font-family="Verdana" font-size="8pt">Leasure Station</fo:inline></fo:block>
                  </fo:block-container>

                  <fo:block-container z-index="2" position="absolute" left="0.091in" top="0.431in" width="0.302in" height="0.239in" overflow="hidden">
                    <fo:block><fo:inline font-family="Verdana" font-size="8pt">#1</fo:inline></fo:block>
                  </fo:block-container>

                  <fo:block-container z-index="2" position="absolute" left="0.653in" top="0.431in" width="1.186in" height="0.177in" overflow="hidden">
                    <fo:block><fo:inline font-family="Verdana" font-size="8pt">ASDF1234QWER</fo:inline></fo:block>
                  </fo:block-container>

                  <fo:block-container z-index="1" position="absolute" left="0in" top="0in" width="48.5mm" height="20mm" overflow="hidden">
                    <fo:block><fo:external-graphic src="url(.\fop-1.0\img\orange_s_text.png)" content-width="48.500mm" scaling="non-uniform" content-height="20.000mm"/></fo:block>
                  </fo:block-container>
                </fo:block>
              </fo:table-cell>

【问题讨论】:

    标签: pdf-generation xsl-fo apache-fop


    【解决方案1】:

    在所有 zindex=2 块之前移动索引为 1 的块并且它工作。随便。

    【讨论】:

    • z-index 在 Apache FOP 中无效,因为它仍然不受支持。只有重叠元素的顺序才能确定它们的可见性指数。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-11-25
    • 2017-08-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多