簡體   English   中英

在IE 7中,p:accordionPanel在圈數p:menubar

[英]In IE 7 primefaces p:accordionPanel over laps p:menubar

在IE7下方的代碼p:accordionPanel上位於p:menubar.ie上,當我單擊菜單欄時,菜單項隱藏在p:accordionPanel下。 但是,Chrome和Firefox中沒有問題。

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">
        <h:head>    
        </h:head>
        <h:body>
   <h:form>         
       <p:menubar>  
            <p:submenu label="Company" >
            <p:menuitem value="Software Engineer" />
            <p:menuitem value="Manager" />  
            <p:menuitem value="Business Ananlyst"  />
            <p:menuitem value="System Analyst" />
            </p:submenu>
    </p:menubar>

        <p:accordionPanel>
            <p:tab title="Lorem Ipsum ">
                <h:panelGrid columns="3">
                    <h:outputText
                        value="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum"></h:outputText>
                </h:panelGrid>
            </p:tab>
        </p:accordionPanel>
    </h:form>
    </h:body>

</html>

可以通過給<p:menubar /> <p:accordionPanel />更大的z-index來解決

在我的示例中,我所做的更改是

<p:menubar style="z-index:2000">
<p:accordionPanel style="z-index:1000">

但是,如果有多個組件,則可以使用jquery解決。 首先聲明的組件的z-index值大於后來的

$(document).ready(function(){
 var zIndexNumber = 1000;
        $('div').each(function() {
            $(this).css('zIndex', zIndexNumber);
            zIndexNumber -= 10;
        });
});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM