Apache FOP:zindex 似乎无法在重叠块中工作

发布于 2024-09-24 16:42:58 字数 1735 浏览 1 评论 0原文

我是一个 FOP 新手。我正在尝试使用块容器和 zindex 在图像顶部显示文本。但图像始终位于顶部。如果删除图像,我可以看到文本,因此文本位于图像下方。

这是一个表格单元格的内部。这是相关代码:

<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>

I am a FOP newb. I am trying to show text on top of an image by using block-container's and zindexes. The image is always on top though. If i remove the image, i can see the text, so the text is under the image.

This is inside of a table cell. here is the relevant code:

<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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

韵柒 2024-10-01 16:42:58

将索引为 1 的块移到所有 zindex=2 块之前并且它起作用了。任何。

moved the block with index 1 before all the zindex=2 blocks and it worked. whatever.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文