2017-05-17 22 views
0

현재 사이트를 만들고 있으며 "4 위치"드롭 다운 메뉴가 정말 좋았습니다. 그러나 탐색 메뉴가 중복되어 있습니다. 나의 초기 생각은 Z-index를 사용하여 메인 네비게이션 상단에 쌓아 두었지만 도움이되지 않습니다. 내가 무엇을 할 수 있을지?? 그것을 볼 수 : http://pcfm.adamerica.me/Z- 색인이 드롭 다운 메뉴가 포함 된 div를 만들기 위해 작동하지 않습니다. 내비게이션

이 이동하면 CSS입니다 :

/* Dropdown Button */ 
.location-dropbtn { 
    background-color: #4CAF50; 
    color: white; 
    padding: 10px; 
    font-size: 12px; 
    border: none; 
    cursor: pointer; 
} 

/* Dropdown button on hover & focus */ 
.location-dropbtn:hover, .location-dropbtn:focus { 
    background-color: #3e8e41; 
} 

/* The container div - needed to position the dropdown content */ 
.location-dropdown { 
    position: absolute; 
    display: inline-block; 
    margin-top: -10px; 
    margin-left: 20px; 
    margin-right: 20px; 
    z-index: 110001; 
} 

/* Dropdown Content (Hidden by Default) */ 
.location-dropdown-content { 
    display: none; 
    position: absolute; 
    background-color: #4CAF50; 
    color: #ffffff; 
    min-width: 160px; 
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 
    z-index: 110001; 
} 

/* Links inside the dropdown */ 
.location-dropdown-content a { 
    color: #ffffff; 
    font-size: 12px; 
    padding: 12px 16px; 
    text-decoration: none; 
    display: block; 
    z-index: 110001; 
} 

/* Change color of dropdown links on hover */ 
.location-dropdown-content a:hover { 
    background-color: #3e8e49 
} 

/* Show the dropdown menu */ 
.show { 
    display:block; 
    z-index: 110001; 
} 

답변

0

header { 
    z-index: 1000; 
} 
0

귀하의 .location - 드롭 다운을 작동 .show Z- 인덱스가 있습니다 110001.
당신의 .responsive-header class의 Z- 인덱스 : 100000 (해당 방법은 980px 미만의 미디어에서 제대로 작동 함)

980px보다 큰 미디어 :

class = "header2 sticky"인 헤더는 z- 인덱스가 100000000입니다. 여기에 문제가 있으므로이 헤더 z- 인덱스를 110000으로 변경하면 제대로 작동합니다.