모달레이어 헤드 가림문제
/* modal */
#modalDiv {
display: none;
position: fixed;
top: 0px;
left: 0px;
z-index: 100;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
padding: 50px;
cursor: pointer;
}
/* #modalDiv div {height:100%; padding:5px; border:1px solid red; border-radius:15px;} */
* #modalDiv div {}
#modalDiv iframe {
display: block;
width: 60%;
height: 100%;
border: none;
border-radius: 10px;
position: absolute;
top: 52%;
left: 50%;
transform: translate(-50%, -50%);
}
/* #modalDiv span {position:absolute; top:40px; left:50%; color:#333; font-size:16px; font-weight:bold; } */
#modalDiv span {
display: inline-block;
position: absolute;
top: 14px;
right: 24%;
width: 32px;
height: 32px;
}
.modal-span {
color: #c00000;
cursor: pointer;
margin-right: 5px;
}
위에 두 이미지처럼 모달 상단을 올리면 헤드 디자인에 가려지는데요...혹시 지금 올린 소스에서 수정시에 헤드위에 레이어가 올라가게 가능한건가요....혹시 가능하시다면 고수님의 조언을 부탁드리겠습니댜. 감사합니다.
#modalDiv {
display: none;
position: fixed;
top: 0px;
left: 0px;
z-index: 100;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
padding: 50px;
cursor: pointer;
}
/* #modalDiv div {height:100%; padding:5px; border:1px solid red; border-radius:15px;} */
* #modalDiv div {}
#modalDiv iframe {
display: block;
width: 60%;
height: 100%;
border: none;
border-radius: 10px;
position: absolute;
top: 52%;
left: 50%;
transform: translate(-50%, -50%);
}
/* #modalDiv span {position:absolute; top:40px; left:50%; color:#333; font-size:16px; font-weight:bold; } */
#modalDiv span {
display: inline-block;
position: absolute;
top: 14px;
right: 24%;
width: 32px;
height: 32px;
}
.modal-span {
color: #c00000;
cursor: pointer;
margin-right: 5px;
}
위에 두 이미지처럼 모달 상단을 올리면 헤드 디자인에 가려지는데요...혹시 지금 올린 소스에서 수정시에 헤드위에 레이어가 올라가게 가능한건가요....혹시 가능하시다면 고수님의 조언을 부탁드리겠습니댜. 감사합니다.

답변 1개 / 댓글 1개
헤드의 z-index보다 큰 수를
#modalDiv의 z-index에 수정하시면 모달의 반투명 배경이 헤드를 반투명하게 덮고 그 위에 모달이 표시 됩니다.
#modalDiv의 z-index에 수정하시면 모달의 반투명 배경이 헤드를 반투명하게 덮고 그 위에 모달이 표시 됩니다.
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.