Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

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

              
                          <section class="blackie">
            <div class="stars">
              <div class="pos1 st1"></div>
              <div class="pos2 st1"></div>
              <div class="pos3 st1"></div>
              <div class="pos4 st1"></div>
              <div class="pos5 st1"></div>
              <div class="pos6 st1"></div>
              <div class="pos7 st1"></div>
            </div>
            <div class="moon"></div>
            <div class="cloud blackie">
              <div class="cloud1"><div></div></div>
              <div class="cloud2"><div></div></div>
              <div class="cloud3"><div></div></div>
            </div>
            <div class="mountain">
              <div class="mount1"></div>
            </div>
            <div class="river">
              
            </div>
            <div class="plants">
            </div>
                 
          </section> 
              
            
!

CSS

              
                @import "compass/css3";

@import "compass";
$cloud:#3af;
$cloud:rgba(51, 170, 255, 1);

@mixin keyframes($animationName) {
    @-webkit-keyframes #{$animationName} {
        @content;
    }
    @-moz-keyframes #{$animationName} {
        @content;
    }
    @-o-keyframes #{$animationName} {
        @content;
    }
    @keyframes #{$animationName} {
        @content;
    }
}
@mixin transition($transition-property, $transition-time, $method) {
    -webkit-transition: $transition-property $transition-time $method;
    -moz-transition: $transition-property $transition-time $method;
    -ms-transition: $transition-property $transition-time $method;
    -o-transition: $transition-property $transition-time $method;
    transition: $transition-property $transition-time $method;
}
html, body{
	overflow-x:hidden;
	margin:0;padding:0;
}
.blackie{
  background: #555;
}
section{
	display:block;
	overflow:hidden;
	height:600px;
	width:100%;
}
.cloud{
	width:100%;
	overflow:hidden;
	& > div{
	  position: absolute;
	  width: 100%;
	  height: 300px;
	}
	.cloud1{
	  border-radius: 50%;
	  margin-top: 120px;
	  @include experimental('animation', move-clouds, webkit, moz, o, ms, not khtml);
	  @include experimental('animation-duration', 25s, webkit, moz, o, ms, not khtml);
	  $animation-support: webkit, moz, o, ms, not khtml;
	  @include experimental('animation-iteration-count', infinite, $animation-support...);
	  @include experimental('animation-timing-function', ease-out, $animation-support...);
	  	& div{
		  border-radius: 50%;
		  width: 150px;
		  height: 120px;
		  background-color: $cloud;
		  @include background-image(radial-gradient(45px 45px, #3af 10px, dodgerblue 30px));
		  position: absolute;
		  
		}
		& div:after{
		  content: " ";
		  border-radius: 70%;
		  width: 180px;
		  height: 110px;
		  background-color: $cloud;
		  @include background-image(radial-gradient(45px 45px, #39f 10px, dodgerblue 30px));
		  position: absolute;
		  margin-left: 50px;
		}
		& div:before{
		  content: " ";
		  border-radius: 50%;
		  width: 120px;
		  height: 70px;
		  background-color: $cloud;
		  @include background-image(radial-gradient(45px 45px, #2ea0ff 10px, #1e90ff 30px));
		  position: absolute;
		  margin-left: 90px;
		  margin-top: 80px;
		}
	}.cloud3{
	  border-radius: 50%;
	  margin-top: 50px;
	  @include experimental('animation', move-clouds3, webkit, moz, o, ms, not khtml);
	  @include experimental('animation-duration', 20s, webkit, moz, o, ms, not khtml);
	  $animation-support: webkit, moz, o, ms, not khtml;
	  @include experimental('animation-iteration-count', infinite, $animation-support...);
	  @include experimental('animation-timing-function', linear, $animation-support...);
	  	& div{
		  border-radius: 60%;
		  width: 140px;
		  height: 110px;
		  background-color: $cloud;
		  @include background-image(radial-gradient(45px 45px, #3af 10px, dodgerblue 30px));
		  position: absolute;
		  
		}
		& div:after{
		  content: " ";
		  border-radius: 78%;
		  width: 180px;
		  height: 110px;
		  background-color: $cloud;
		  position: absolute;
		  @include background-image(radial-gradient(45px 45px, #39f 10px, dodgerblue 30px));
		  margin-left: 40px;
		}
		& div:before{
		  content: " ";
		  border-radius: 50%;
		  width: 150px;
		  height: 70px;
		  background-color: $cloud;
		  position: absolute;
		  margin-left: 50px;
		  margin-top: 70px;
		}
	}
	.cloud2{
		margin-top: 100px;
		@include experimental('animation', move-clouds-2, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', 30s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);
		& div{
		  border-radius: 50%;
		  width: 190px;
		  height: 120px;
		  background-color: $cloud;
		  @include background-image(radial-gradient(45px 45px, hsl(210,100%,55%) 15px, #1e90ff 30px));		  
		  position: absolute;
		  
		}
		& div:after{
		  content: " ";
		  border-radius: 50%;
		  width: 180px;
		  height: 90px;
		  background-color: hsl(210,100%,45%);
		  @include background-image(radial-gradient(45px 45px, #39f 10px, dodgerblue 30px));
		  position: absolute;
		  margin-left: 60px;
		  margin-top: -20px;
		}
		& div:before{
		  content: " ";
		  border-radius: 50%;
		  width: 180px;
		  height: 80px;
		  background-color: $cloud;
		  position: absolute;
		  margin-left: 40px;
		  margin-top: 50px;
		}
	}
}

@include keyframes(move-clouds) {
  0% {
    @include transform( translateX(100%) );
  }

  100% {
    @include transform( translateX(-25%) );
  }
}

@include keyframes(move-clouds3) {
  0% {
    @include transform( translateX(30%) );
    opacity:1;
  }

  60% {
    @include transform( translateX(-25%) );
    opacity:1;
  }
  61% {
    @include transform( translateX(-25%) );
    opacity:0;
    display:none;    
  }

  62% {
    @include transform( translateX(100%) );
    opacity:0;
    display:none;    
  }
  63% {
    @include transform( translateX(100%) );
    opacity:1;
    display:block;    
  }
  100% {
    @include transform( translateX(30%) );
    opacity:1;
  }
}


@include keyframes(move-clouds-2) {
  0% {
    @include transform( translateX(10%) );
    opacity:1;
  }

  10% {
    @include transform( translateX(-25%) );
    opacity:1;
  }
  11% {
    @include transform( translateX(-25%) );
    opacity:0;
    display:none;    
  }

  12% {
    @include transform( translateX(100%) );
    opacity:0;
    display:none;    
  }
  13% {
    @include transform( translateX(100%) );
    opacity:1;
    display:block;    
  }
  100% {
    @include transform( translateX(10%) );
    opacity:1;
  }
}

.mountain{
	height:400px;
	width:100%;
	overflow:hidden;

	& div.mount1{
		background-color:#989;
		height:400px;
		margin-top:200px;
		width:400px;
		@include transform( rotate(40deg) );
	    &:before{
			background-color:#989;
	    	content:" ";
			margin-top:-200px;
	    	height:400px;
			margin-left:400px;
			width:400px;
			position:absolute;
	    }
	}
}
.river{
	border-top:1px solid #999;
	width:100%;
	height:200px;
	background-color:#78f;
}
.moon{
	position:absolute;
	top:30px;
	right:40px;
	height:120px;
	width:120px;
	border-radius:100%;
	border:40px solid #fffff1;
	box-shadow:0 0 100px 20px #ffffc0;
	background-color:#fffff1;
}
.padding-0{
	padding:0px;
}
.stars{
	.pos1{
		@include transform( scale(.3) );
		margin:50px;
		@include experimental('animation', star-blinking1, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', .8s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);
	}
	.pos2{
		@include transform( scale(.6) );
		margin:30px 60%;
		@include experimental('animation', star-blinking2, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', 1s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);
	}
	.pos3{
		margin:60px 15%;
		@include transform( scale(.8) );
		@include experimental('animation', star-blinking3, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', .9s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);
	}
	.pos4{
		margin:50px 30%;
		@include transform( scale(.7) );
		@include experimental('animation', star-blinking4, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', 1.1s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);
	}	
	.pos5{
		margin:120px 10%;
		@include transform( scale(1) );
		@include experimental('animation', star-blinking5, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', 1s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);	
	}
	.pos6{
		margin:140px 35%;
		@include transform( scale(.9) );
		@include experimental('animation', star-blinking6, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', .7s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);
	}	
	.pos7{
		margin:100px 50%;
		@include transform( scale(.5) );
		@include experimental('animation', star-blinking7, webkit, moz, o, ms, not khtml);
		@include experimental('animation-duration', 1.2s, webkit, moz, o, ms, not khtml);
		$animation-support: webkit, moz, o, ms, not khtml;
		@include experimental('animation-iteration-count', infinite, $animation-support...);
		@include experimental('animation-timing-function', linear, $animation-support...);	
	}	
	.st1{
		position:absolute;
		&:after{
			content:" ";
			position:absolute;
			width:0;
			height:0;
			border:0;
			border-left:10px solid transparent;
			border-right:10px solid transparent;
			border-top:20px solid #ff8;
			@include transform-origin( 50%, 50%);
			@include transform( rotate(60deg) );
		}
		&:before{
			content:" ";
			position:absolute;
			width:0;
			height:0;
			margin-top:-4px;
			border:0;
			border-left:10px solid transparent;
			border-right:10px solid transparent;
			border-top:20px solid #ff8;
			@include transform-origin( 50%, 50%);
			@include transform( rotate(120deg) );
		}
	}
}
@include keyframes(star-blinking1) {
  0% {
    @include transform( scale(.3) );
	opacity:.8;
	@include transform-origin( 50%, 50%);
  }
  50% {
    @include transform-origin( 50%, 50%);
	@include transform( scale(.4) );
	opacity:.9;
  }
  100% {
    @include transform( scale(.3) );
	@include transform-origin( 50%, 50%);
 	opacity:.8;
 }
}
@include keyframes(star-blinking2) {
  0% {
    @include transform( scale(.6) );
	opacity:.8;
	@include transform-origin( 50%, 50%);
  }
  50% {
    @include transform-origin( 50%, 50%);
	@include transform( scale(.7) );
	opacity:.9;
  }
  100% {
    @include transform( scale(.6) );
	@include transform-origin( 50%, 50%);
 	opacity:.8;
 }
}
@include keyframes(star-blinking3) {
  0% {
    @include transform( scale(.8) );
	opacity:.8;
	@include transform-origin( 50%, 50%);
  }
  50% {
    @include transform-origin( 50%, 50%);
	@include transform( scale(.7) );
	opacity:.9;
  }
  100% {
    @include transform( scale(.8) );
	@include transform-origin( 50%, 50%);
 	opacity:.8;
 }
}
@include keyframes(star-blinking4) {
  0% {
    @include transform( scale(.7) );
	opacity:.8;
	@include transform-origin( 50%, 50%);
  }
  50% {
    @include transform-origin( 50%, 50%);
	@include transform( scale(.6) );
	opacity:.9;
  }
  100% {
    @include transform( scale(.7) );
	@include transform-origin( 50%, 50%);
 	opacity:.8;
 }
}
@include keyframes(star-blinking5) {
  0% {
    @include transform( scale(1) );
	opacity:.8;
	@include transform-origin( 50%, 50%);
  }
  50% {
    @include transform-origin( 50%, 50%);
	@include transform( scale(.9) );
	opacity:.9;
  }
  100% {
    @include transform( scale(1) );
	@include transform-origin( 50%, 50%);
 	opacity:.8;
 }
}
@include keyframes(star-blinking6) {
  0% {
    @include transform( scale(.9) );
	opacity:.8;
	@include transform-origin( 50%, 50%);
  }
  50% {
    @include transform-origin( 50%, 50%);
	@include transform( scale(.8) );
	opacity:.9;
  }
  100% {
    @include transform( scale(.9) );
	@include transform-origin( 50%, 50%);
 	opacity:.8;
 }
}
@include keyframes(star-blinking7) {
  0% {
    @include transform( scale(.5) );
	opacity:.8;
	@include transform-origin( 50%, 50%);
  }
  50% {
    @include transform-origin( 50%, 50%);
	@include transform( scale(.6) );
	opacity:.9;
  }
  100% {
    @include transform( scale(.5) );
	@include transform-origin( 50%, 50%);
 	opacity:.8;
 }
}
.plants{
  clear:both;
  height:100px;
  border:5px dashed #9fa;
  width:100%;
  background-color:#9fa;
}
              
            
!

JS

              
                
              
            
!
999px

Console