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. 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

JavaScript

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

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

              
                .ul.mountains
  .li.peak1
  .li.peak2
  .li.peak3

.sun

.clouds-wrapper
  .ul.clouds1
    .li
    .li
    .li
  
  .clouds2-container
    .ul.clouds2
      .li
      .li
      .li
      

  .clouds3-container
    .ul.clouds3
      .li
      .li
      .li

  .clouds4-container
    .ul.clouds4
      .li
      .li
      .li
              
            
!

CSS

              
                .mountains {
  position: relative;
  margin: 320px auto;
  width: 800px;
  z-index: 3;
}

.li {
  float: left;
}

.peak1 {
	border-left: 200px solid transparent;
	border-right: 200px solid transparent;
	border-bottom: 200px solid SteelBlue;
}

.peak2 {
	border-left: 150px solid transparent;
	border-right: 175px solid transparent;
	border-bottom: 150px solid SteelBlue;
  margin-left: -200px;
  margin-top: 50px;
}

.peak3 {
  
	border-left: 200px solid transparent;
	border-right: 200px solid transparent;
	border-bottom: 200px solid SteelBlue;
  margin-left: -250px;
  
}

.sun {
  animation: rise 20s ease-in-out 2s infinite Alternate both;
  -webkit-animation: rise 10s ease-in-out 1s infinite Alternate both; 
  background: gold;
  border-radius: 50%;
  height: 100px;
  margin: 0 auto;
  width: 100px;
}

.clouds-wrapper {
  margin: -150px auto;
  width: 800px;
  
  .ul {
  position: relative;
  }
  
  .li {
    position: absolute;
    background: Gainsboro ;
    
    &:nth-child(1) {
      border-radius: 30px;
      height: 50px;
      width: 150px;
    } 
    
    &:nth-child(2) {
      border-radius: 50%;
      height: 80px;
      margin-top: -40px;
      margin-left: 23px;
      width: 80px;
    }
    
    &:nth-child(3) {
      border-radius: 50%;
      height: 50px;
      margin-top: -25px;
      margin-left: 80px;
      width: 50px;
    }
  }
}

.clouds1 {
  animation: slideOver 12s infinite Alternate-reverse both;
  -webkit-animation: slideOver 12s infinite Alternate-reverse both;
}

.clouds2-container {
  transform: scale(.75);
  -webkit-transform: scale(.75);
}

.clouds2 {
  animation: slideOver 7s .5s infinite Alternate-reverse both;
  -webkit-animation: slideOver 7s .5s infinite Alternate-reverse both;
}

.clouds3-container {
  transform: scale(.7);
  -webkit-transform: scale(.7);
}

.clouds3{
  margin-top: 20px;
  animation: slideOver 9s 2s infinite Alternate both;
  -webkit-animation: slideOver 9s 2s infinite Alternate both;
}

.clouds4 {
  margin-top: 20px;
  animation: slideOver 13s linear 3s infinite Alternate both;
  -webkit-animation: slideOver linear 13s 3s infinite Alternate both;

}

@keyframes slideOver {
    0% {
    transform: translateX(-300px);
    -webkit-transform: translateX(-300px);
    opacity: 0;
  }
  
  20% {
    opacity: 1;
    
  }
  
  90% {
    opacity: 1;
  }
  
  100% {
    transform: translateX(800px);
    -webkit-transform: translateX(800px);
    opacity: 0;
  }
}

@-webkit-keyframes slideOver {
  0% {
    opacity: 0;
    transform: translateX(-300px);
    -webkit-transform: translateX(-300px);
  }
  
  20% {
    opacity: 1;
  }
  
  90% {
    opacity: 1;
  }
  
  100% {
    opacity: 0;
    transform: translateX(800px);
    -webkit-transform: translateX(800px);
  }
}

@keyframes rise {
  0% {
    background: tomato;
    opacity: 0;
    transform: translateY(0px);
    -webkit-transform: translateY(0px);
  }
  
  10% {
    opacity: 1;
  }
  
  20% {
    background: goldenrod;
  }
  
  55% {
    background: golden;
  }
  
  100% {
    transform: translateY(-350px);
    -webkit-transform: translateY(-350px);
  }
}

@-webkit-keyframes rise {
  0% {
    background: tomato;
    transform: translateY(0px);
    -webkit-transform: translateY(0px);
    opacity: 0;
  }
  
  10% {
    opacity: 1;
  }
  
  20% {
    background: goldenrod;
  }
  
  55% {
    background: golden;
  }
  
  100% {
    transform: translateY(-350px);
    -webkit-transform: translateY(-350px);
  }
}



              
            
!

JS

              
                
              
            
!
999px

Console