我有两个模式面板,即panel1和panel2。

两个面板在页面上同时加载,

要求是将panel1加载到panel2上。
但是,在页面加载时,无论模型面板在页面上的位置如何,它总是导致panel2在panel1之上。

我正在使用richfaces-3.3.2-SR1版本

代码在这里:

<rich:modalPanel id="panel1" resizeable="false" showWhenRendered="true">
  My data goes here
</rich:modalPanel>
<rich:modalPanel id="panel2" resizeable="false" showWhenRendered="true">
   <center>
       <h:graphicImage url="image.gif" />
   </center>
</rich:modalPanel>


注意:panel1包含图像

谢谢
尼克斯

最佳答案

尝试设置z-index属性


  z-index属性指定
  元素的堆叠顺序。
  
  具有较高堆栈顺序的元素是
  总是在元素前面
  降低堆叠顺序。
  
  注意:z-index仅适用于定位
  元素(位置:绝对,
  位置:相对,或位置:固定)。


尝试

<rich:modalPanel id="panel1" resizeable="false" showWhenRendered="true" zindex="2000">
  My data goes here
</rich:modalPanel>

<rich:modalPanel id="panel2" resizeable="false" showWhenRendered="true" zindex="1000">
   <center>
       <h:graphicImage url="image.gif" />
   </center>
</rich:modalPanel>

关于java - 加载两个模式面板时出现问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4968004/

10-09 06:15
查看更多