본문 바로가기
카테고리 없음

이미지 Layer 띄우기

by GoodDev 2019. 5. 20.

1. css

#lightbox {
    position:fixed; /* keeps the lightbox window in the current viewport */
    top:0; 
    left:0; 
    width:100%; 
    height:100%; 
    background:url(overlay.png) repeat; 
    text-align:center;
}

#lightbox p {
    text-align:right; 
    color:#fff; 
    margin-right:20px; 
    font-size:12px; 
}

#lightbox img {
    box-shadow:0 0 25px #111;
    -webkit-box-shadow:0 0 25px #111;
    -moz-box-shadow:0 0 25px #111;
    max-width:940px;
}

 

2. document ready 에

https://webdesign.tutsplus.com/articles/super-simple-lightbox-with-css-and-jquery--webdesign-3528

 

Super Simple Lightbox With CSS and jQuery

Rather than using a bloated plugin that has features you'll never use, this tutorial shows you how to create a super simple lightbox for handling images. It's perfect for image galleries,...

webdesign.tutsplus.com

 

 

참조 https://webdesign.tutsplus.com/articles/super-simple-lightbox-with-css-and-jquery--webdesign-3528

댓글