http://www.markthatred.com/ 제 작품 섹션으로 가서 축소판을 클릭하면이 사이트가 있습니다. 라이트 박스는 정상적으로 작동하지만 라이트 박스에있는 동안 스크롤 할 수 없게 만들 수있는 방법은 무엇입니까?라이트 박스를 스크롤하지 못하게하려면 어떻게해야합니까?
HTML 당신은 단순히 한 라이트가 활성화되어있는 한, HTML 요소에 overflow: hidden
을 추가 할 수
.lightbox {
/** Default lightbox to hidden */
display: none;
/** Position and style */
position: fixed;
z-index: 999;
width: 100%;
height: 100%;
text-align: center;
top: 0;
left: 0;
background: rgba(0,0,0,0.8);
}
.lightbox img {
/** Pad the lightbox image */
max-width: 95%;
max-height: 90%;
margin-top: 2%;
}
.lightbox img:hover {
opacity: 1;
}
.lightbox:target {
/** Remove default browser outline */
outline: none;
/** Unhide lightbox **/
display: block;
overflow: hidden;
}
완벽하게 작동합니다! 감사! –
환영합니다 .... 멋진 디자인 – Mani
@ user2993018 - 라이트 박스가 클릭에 의해 트리거되고 닫히는 경우에만. – MattDiMu