代码之家  ›  专栏  ›  技术社区  ›  mkoryak

ApacheFop:Zindex似乎没有在重叠的块中工作。

  •  6
  • mkoryak  · 技术社区  · 14 年前

    我是个新手。我试图使用块容器和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>
    
    1 回复  |  直到 14 年前
        1
  •  4
  •   mkoryak    14 年前

    在所有zindex=2块之前移动索引为1的块,它工作正常。无论什么。

    推荐文章