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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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 id="loading">
	<img src="http://kurokoroll.com/images/loading.svg">
</div>
<div id="container">
	<div class="contentWrap" id="image1">
		<div class="content">
			<h1>nature</h1>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla posuere magna mi, ut interdum mauris facilisis non. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur a dolor feugiat, pellentesque tellus sed, maximus massa. Nulla sagittis condimentum eros, eget ornare nulla scelerisque et.</p>
		</div>
	</div>
	<div class="contentWrap" id="image2">
		<div class="content">
			<h1>flower</h1>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla posuere magna mi, ut interdum mauris facilisis non. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur a dolor feugiat, pellentesque tellus sed, maximus massa. Nulla sagittis condimentum eros, eget ornare nulla scelerisque et.</p>
		</div>
	</div>
	<div class="contentWrap" id="image3">
		<div class="content">
			<h1>tree</h1>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla posuere magna mi, ut interdum mauris facilisis non. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur a dolor feugiat, pellentesque tellus sed, maximus massa. Nulla sagittis condimentum eros, eget ornare nulla scelerisque et.</p>
		</div>
	</div>
	<div class="contentWrap" id="image4">
		<div class="content">
			<h1>bird</h1>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla posuere magna mi, ut interdum mauris facilisis non. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur a dolor feugiat, pellentesque tellus sed, maximus massa. Nulla sagittis condimentum eros, eget ornare nulla scelerisque et.</p>
		</div>
	</div>
	<div class="contentWrap" id="image5">
		<div class="content">
			<h1>sea</h1>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla posuere magna mi, ut interdum mauris facilisis non. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur a dolor feugiat, pellentesque tellus sed, maximus massa. Nulla sagittis condimentum eros, eget ornare nulla scelerisque et.</p>
		</div>
	</div>
	<div class="contentWrap" id="image6">
		<div class="content">
			<h1>mountain</h1>
			<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla posuere magna mi, ut interdum mauris facilisis non. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur a dolor feugiat, pellentesque tellus sed, maximus massa. Nulla sagittis condimentum eros, eget ornare nulla scelerisque et.</p>
		</div>
	</div>
</div>
            
          
!
            
              body{
  line-height: 1.75;
}
#loading{
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,1);
  display: flex;
  justify-content: center;
  z-index: 10;
  transition: .3s;
  opacity: 1;
  text-align: center;
}
#container{
  width: 100vw;
}
.contentWrap{
  position: relative;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}
.content{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 20px rgba(0,0,0,.8);
}
.content h1{
  font-family: Arial;
  font-size: 4rem;
  font-weight: bold;
  margin-bottom: 5vw;
}
#image1{
  background: url(http://kurokoroll.com/images/image1.jpg) center center;
  background-size: cover;
}
#image2{
  background: url(http://kurokoroll.com/images/image2.jpg) center center;
  background-size: cover;
}
#image3{
  background: url(http://kurokoroll.com/images/image3.jpg) center center;
  background-size: cover;
}
#image4{
  background: url(http://kurokoroll.com/images/image4.jpg) center center;
  background-size: cover;
}
#image5{
  background: url(http://kurokoroll.com/images/image5.jpg) center center;
  background-size: cover;
}
#image6{
  background: url(http://kurokoroll.com/images/image6.jpg) center center;
  background-size: cover;
}
            
          
!
            
              (function() {
	let begin = new Date(); //開始時刻 タイムスタンプの取得
	const loadingCotent = document.getElementById('loading'); //ローディング要素の取得
	const loadingTime = 1000; // フェードインの時間

	document.addEventListener('DOMContentLoaded', function(){
		//フェードアウトの処理
		let id = setInterval(function() {
			let current = new Date() - begin; //beginから現在の時間
			if (current > loadingTime) { //フェードインの時間を超えたら要素を消す
				clearInterval(id);
				current = loadingTime; //今の時間とフェードインの時間の差をなくす
				loadingCotent.style.display = "none"; //要素を消す
			}
			loadingCotent.style.opacity = 1 - (current / loadingTime) ; //割合に応じて透過していく
		}, 10); //100分の1秒間隔で繰り返し実行
	});
})();
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console