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

              
                <span class="cloud">
  <span class="particle p1"></span>
  <span class="particle p2"></span>
  <span class="particle p3"></span>
  
  <span class="raindrops">
    <span class="drop d0"></span>
    <span class="drop d1"></span>
    <span class="drop d2"></span>
    <span class="drop d3"></span>
    <span class="drop d4"></span>
    <span class="drop d5"></span>
    <span class="drop d6"></span>
    <span class="drop d7"></span>
    <span class="drop d8"></span>
    <span class="drop d9"></span>
    <span class="drop d10"></span>
    <span class="drop d11"></span>
    <span class="drop d12"></span>
    <span class="drop d13"></span>
    <span class="drop d14"></span>
    <span class="drop d15"></span>
  </span>
  
</span>
              
            
!

CSS

              
                @import "bourbon";

$bg-color : #2F4E66;
$color : #DCE2EF;
$thunder : #a4cbd8;

body {
  background:$bg-color;
  @include animation(thunder 10s ease infinite);
}

$bh: 100px;
$bw: #{$bh*2.1};
$t : 2s;
$dn: 15;

.cloud {
  position:absolute;
  display:block;
  left:50%;
  top:50%;
  width:$bw;
  height:$bh;
  background:$color;
  border-radius:10% 15%;
  -webkit-filter: drop-shadow(8px 3px 0 rgba(0,0,0,0.2));
  @include animation(float #{$t/3} ease infinite);
  
  .particle {    
    position:absolute;
    display:block;
    bottom:0;
    background:$color;
    border-radius:47% 54%;
    
    &.p1 {
      width:$bh;
      height:$bh;
      left: #{-$bh/2};
      @include animation(rotate $t #{-$t/4} linear infinite);
    }
    
    &.p2 {
      width:#{$bh*1.4};
      height:#{$bh*1.4};
      left: 0;
      bottom:#{$bh/2};
      @include animation(rotate $t #{(-$t/4)*2} linear infinite);
      
    }
    
    &.p3 {
      width:#{$bh*2};
      height:#{$bh*2};
      right: #{-$bh};
      @include animation(rotate $t #{(-$t/4)*3} linear infinite);
    }
    
  }

  .raindrops {
    display:block;
    position:absolute;
    top:115%;
    width:100%;
    
    .drop {
      display:block;
      position:absolute;
      width:$bh/9;
      height:$bh/9;
      background:$color;
      border-radius: 50% 0 50% 50%;
      
      @for $i from 0 through $dn {
        
        &.d#{$i} {
          left:#{(100% / $dn) * $i}; 
          $t : 1.3s;
          @include animation(fall $t/3 #{(-$t/1.7)*$i} linear infinite);
        }
        
      }
      
    }
    
  }
  
}

@include keyframes (rotate) {
  0% {
    @include transform(rotateZ(0deg));
  }
  50% {
    @include transform(rotateZ(180deg) scale(0.95));    
  }
  100% {
    @include transform(rotateZ(360deg));
  }
}

@include keyframes (float) {
  0% {
    @include transform(translate3d(-50%, -50%, 0));
  }
  50% {
    @include transform(translate3d(-50%, -40%, 0) scale(0.95));   
  }
  100% {
    @include transform(translate3d(-50%, -50%, 0));
  }
}

@include keyframes (fall) {
  0% {
    opacity:0;
    @include transform(translate3d(500%, -500%, 0) scale(1) rotate3d(0,0,1,45deg));
  }
  45% {
    opacity:1;
    @include transform(translate3d(-100%, 0, 0) scale(1.1) rotate3d(0,0,0,45deg));   
  }
  100% {
    opacity:0;
    @include transform(translate3d(-500%, 500%, 0) scale(0.2) rotate3d(0,0,-1,45deg));
  }
}


@include keyframes (thunder) {
  0% {
    background:$bg-color;
  }
  9.99% {
    background:$bg-color; 
  }
  10% {
    background:mix($bg-color, $thunder); 
  }
  11% {
    background:$bg-color; 
  }
  49.99% {
    background:$bg-color; 
  }
  50% {
    background:mix($bg-color, $thunder); 
  }
  51.01% {
    background:$bg-color; 
  }
  54.99% {
    background:$bg-color; 
  }
  55% {
    background:mix($bg-color, $thunder); 
  }
  58% {
    background:$bg-color; 
  }
  64.99% {
    background:$bg-color; 
  }
  65% {
    background:mix($bg-color, $thunder); 
  }
  65% {
    background:$bg-color; 
  }
  68% {
    background:mix($bg-color, $thunder); 
  }
  70% {
    background:$bg-color; 
  }
  100% {
    background:$bg-color;
  }
  
}
              
            
!

JS

              
                
              
            
!
999px

Console