Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div style="height:400px;"></div>
<button type="button" class="openner">팝업 열기</button>
	<div class="evn-images"><img src="https://image.ytn.co.kr/osen/2016/12/20161209_1481283268_75611600_1.jpg" alt="도깨비" /></div>
<div style="height:400px;"></div>
              
            
!

CSS

              
                body { font-family:sans-serif; }
.dimm { position:fixed; left:0; right:0; top:0; bottom:0; height:100%; overflow:hidden; z-index:1; }
.dimm > .spread { position:fixed; left:0; right:0; top:0; bottom:0; background-color:rgba(0,0,0,.5); overflow:hidden; z-index:100; 
	-webkit-animation-duration:.5s; 
	-webkit-animation-timing-function:cubic-bezier(0.18, 0.89, 0.32, 1.28); 
	-webkit-animation-name:dim; 
	animation-duration:.5s; 
	animation-timing-function:cubic-bezier(0.18, 0.89, 0.32, 1.28); 
	animation-name:dim; 
}
.openner { height:50px; font-size:16px; color:#ffffff; border:none; background-color:#334150; z-index:10; }
.evn-images > img { max-width:100%; }
.evn-popup { display:none; position:fixed; left:20px; right:20px; top:100px; bottom:100px; padding:20px; border-radius:10px; background-color:#ffffff; z-index:101; overflow:hidden; overflow-y:auto;
	-webkit-overflow-scrolling:auto;
}
.evn-popup > div { margin:100px 0 0; line-height:200%; }
.evn-popup > div:first-child { margin:0; }
.evn-popup > button { position:static; }
.dimm .evn-popup { display:block; }
.log { position:fixed; left:0; right:0; bottom:0; font-size:11px; line-height:200%; color:#ffffff; text-align:center; background-color:#000000; z-index:1000; }
@keyframes dim { 
	from {
		opacity:0;
	}
	to{
		opacity:1;
	}
}
              
            
!

JS

              
                $(function(){
	$('.openner').on('click',function(event){
		event.stopPropagation();
		var currentTop = $('body').scrollTop();
		$('body').addClass('dimm').css('top',-currentTop);
		$('.dimm').prepend('<div class="spread"></div>');

		// 팝업 생성
		if($('.dimm').length > 0){
			var layerPopup = '<div class="evn-popup">';
			layerPopup += '	<div>1. 동해 물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세 무궁화 삼천리 화려강산 대한사람 대한으로 길이 보전하세</div>';
			layerPopup += '	<div>2. 남산 위에 저 소나무 철갑을 두른듯 바람서리 불변함은 우리 기상일세 무궁화 삼천리 화려강산 대한사람 대한으로 길이 보전하세</div>';
			layerPopup += '	<div>3. 가을 하늘 공활한데 높고 구름없이 밝은 달은 우리가슴 일편단심일세 무긍화 삼천리 화려강산 대한사람 대한으로 길이 보전하세</div>';
			layerPopup += '	<div>4. 이 기상과 이맘으로 충성을 다하여 괴로우나 즐거우나 나라사랑하세 무궁화 삼천리 화려강산 대한사람 대한으로 길이 보전하세</div>';
			layerPopup += '	<button type="button" class="closer">팝업 닫기</button>';
			layerPopup += '</div>';
			$('body').append(layerPopup);
		}
		if($('.dimm').attr('data-scroll')==undefined) $('.dimm').attr('data-scroll',currentTop);

		//레이어 호출시 액션
		$('.closer, .spread').on('click',function(){
			$('.dimm').removeAttr('style');
			$('.dimm').find('.spread').remove();
			$('.dimm').removeClass('dimm').scrollTop($('body').attr('data-scroll')).removeAttr('data-scroll');
			if($('.evn-popup').length>0){
				$('.evn-popup').hide().remove();
			}
		});
	});	
});
              
            
!
999px

Console