Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


Save Automatically?

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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


              <div class="top">0</div>

<div class="character"></div>
<div class="road">
	<div class="container road1">START</div>
	<div class="container road2">RUN1</div>
	<div class="container road3">RUN2</div>
	<div class="container road4">RUN3</div>
	<div class="container road5">RUN4</div>
	<div class="container road6">RUN5</div>
	<div class="container road7">RUN6</div>
	<div class="container road8">RUN7</div>
	<div class="container road9">RUN8</div>
	<div class="container road10">END</div>


              * {margin:0; padding:0;}
li {list-style: none;}
a {text-decoration: none;}

.top {position:fixed; left: 10px; top: 10px; background:rgba(0,0,0,0.5); z-index:99999; padding:20px; color: #fff; }

.character {
	width:155px; height: 176px;
	background-image: url(;
	position: fixed; left: 50%; margin-left: -78px; bottom:0; z-index:10;
.character.walking {
	animation: walk 0.5s steps(10,start) infinite;
.character.left {
	background-image: url(;
  background-position: 0px;

@keyframes walk {
	from {background-position: 0px 0px}
	to {background-position:1550px 0px}

.road {overflow: hidden; position: fixed; height: 100vh; width: 15000px;}
.road > div {width: 1500px;  color:#666;}
.container {float:left; height: 100vh; line-height:100vh; text-align:center; width: 1500px; position:relative; font-size: 70px; color:#fff; }
.road1 {background-color: #f3f3f3;}
.road2 {background-color: #f3f3f3;}
.road3 {background-color: #f3f3f3;}
.road4 {background-color: #f3f3f3;}
.road5 {background-color: #f3f3f3;}
.road6 {background-color: #f3f3f3;}
.road7 {background-color: #f3f3f3;}
.road8 {background-color: #f3f3f3;}
.road9 {background-color: #f3f3f3;}
.road10 {background-color: #f3f3f3;}



              var lastScrollTop = 0;								           //마지막 상태의 스크롤 변수에 할당
var roadLength = $(".road").width();          	//전체 가로 값 : 15000px

	var wWidth = $(window).width();			          //현재 화면의 가로 값
	var wHeight = $(window).height();		          //현재 화면의 세로 값
	var scrollTop = $(window).scrollTop(); 		    //현재 화면의 스크롤 값
	var dHeight = $("body").height() - wHeight;		//전체 세로 값 - 현재 화면의 세로 값
	var wRoad = roadLength - wWidth;							//전체 가로 값 - 현재 화면의 가로 값
	var step = wRoad/dHeight;											// 전체 가로 값 / 전체 세로 값
	var goLeft = scrollTop * step;		
	$(".road").css({ "transform":"translateX(-"+ goLeft +"px)" });
  $.data(this, "scrollCheek", setTimeout(function(){
	if(scrollTop > lastScrollTop){
	}else {
	lastScrollTop = scrollTop
  if(scrollTop > 100){

		if(e.which == 39){
			var scrollTop = $(document).scrollTop();
		if(e.which == 37){
			var scrollTop = $(document).scrollTop();