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

              
                
<div class="wrapper">
  <div class="jar-container pb-jar-container">
    <div class="jar pb-jar">
      <div class="tendrils">
        <div class="tendril"></div>
        <div class="tendril"></div>
        <div class="tendril"></div>
        <div class="tendril"></div>
        <div class="tendril"></div>
      </div>
    </div>
  </div>
  <div class="jar-container jelly-jar-container">
    <div class="jar jelly-jar">
      <div class="tendrils">
        <div class="tendril"></div>
        <div class="tendril"></div>
        <div class="tendril"></div>
        <div class="tendril"></div>
        <div class="tendril"></div>
      </div>
    </div>
  </div>  
</div>
              
            
!

CSS

              
                $time: 3000ms;
$color-bg: #6fe8cc;
$color-inner-shadow: rgba(0,0,0,.1);
$color-jar: rgba(255,255,255,.15);
$color-pb: #d69443;
$color-pb-label: #e94c2d;
$color-pb-label-accent: lighten($color-pb-label, 10%);
$color-pb-label-highlight: lighten($color-pb-label-accent, 5%);
$color-jelly: #8212b2;
$color-jelly-label: #af5aed;
$color-jelly-label-accent: lighten($color-jelly-label, 10%);
$color-jelly-label-highlight: lighten($color-jelly-label-accent, 5%);

body{
  display:block;
  height:100vh;
  overflow:hidden;
  box-sizing:border-box;
  background:$color-bg;
  overflow:hidden;
}

.jar-container{
  transform-origin:top center;
  position:absolute;
  top:100vh;
  left:0;

  &.pb-jar-container{
    animation: infinite pb-jar-container $time * 4 linear;
  }

  &.jelly-jar-container{
    animation: infinite jelly-jar-container $time * 4 linear;
    margin-top:-10vh;
  }
}

.jar{
  position:relative;
  width:14vw;
  height:10vw;
  border-radius:4vw 4vw 2vw 2vw;
  box-shadow:inset -3vw -1vw $color-inner-shadow; 
  margin-bottom:2vw;
  position:relative;
  animation:infinite jar $time ease;
  border:.5vw solid $color-jar;

  &:before{
    content:'';
    display:block;
    position:absolute;
    height:100%;
    right:0;
    bottom:0;
    left:0;
    animation: infinite fill-jar $time ease;
    z-index:-1;
  }  

  &:after{
    content:'';
    display:block;
    position:absolute;
    top:100%;
    margin-top:.5vw;
    left:1vw;
    right:1vw;
    height:2vw;
    border-radius:.5vw;
    box-shadow: inset -2vw -1vw $color-inner-shadow;
  }  
}

.pb-jar{
  background:
    no-repeat center center radial-gradient(
      $color-pb-label-highlight,
      $color-pb-label-highlight  1.5vw,
      $color-pb-label-accent 1.5vw, 
      $color-pb-label-accent 2vw, 
      transparent 2vw
    ),
    linear-gradient(
      to bottom, 
      $color-jar,
      $color-jar 20%,
      $color-pb-label 20%, 
      $color-pb-label 40%, 
      $color-pb-label-accent 40%,
      $color-pb-label-accent 60%,      
      $color-pb-label 60%, 
      $color-pb-label 80%, 
      $color-inner-shadow 80%,
      $color-inner-shadow 82%,
      $color-jar 82%
    );

  &:before{
    background: $color-pb;
  } 

  &:after{
    background:$color-pb-label;
  }

  .tendril{
    background:$color-pb;
  }
}

.jelly-jar{
  background:
    no-repeat center center radial-gradient(
      $color-jelly-label-highlight,
      $color-jelly-label-highlight  1.5vw,
      $color-jelly-label-accent 1.5vw, 
      $color-jelly-label-accent 2vw, 
      transparent 2vw
    ),
    linear-gradient(
      to bottom, 
      $color-jar,
      $color-jar 20%,
      $color-jelly-label 20%, 
      $color-jelly-label 40%, 
      $color-jelly-label-accent 40%,
      $color-jelly-label-accent 60%,      
      $color-jelly-label 60%, 
      $color-jelly-label 80%, 
      $color-inner-shadow 80%,
      $color-inner-shadow 82%,
      $color-jar 82%
    );

  &:before{
    background: $color-jelly;
  }

  &:after{
    background:$color-jelly-label;
  }

  .tendril{
    background:$color-jelly;
  }  
}

.tendrils{
  position: absolute;
  top:100%;
  margin-top:.5vw;
  right:2vw;
  left:2vw;
  height:16vw;
  display:flex;
  transform-origin:top center;
  justify-content:space-between;
}

.tendril{
  width:1vw;
  height:80%;
  transform-origin: top center;
  animation: infinite $time tendril ease;
  animation-delay: $time/2;
  border-radius: 0 0 .5vw .5vw;

  &:nth-child(1){
    height:80%;       
  }  

  &:nth-child(2){
    height:92%;       
  }

  &:nth-child(3){
    height:100%;
  }  

  &:nth-child(4){
    height: 90%;    
  }

  &:nth-child(5){
    height: 82%;
  }
}


$scale-down: 1;
$scale-up: 1.2;
$rotation: 25deg;

@keyframes pb-jar-container{
  0%{
    top:100vh;
    left:40vw;
    transform: rotate($rotation);
    opacity:0;
  }    

  1%{
    opacity:1;
  }

  12.5%{
    top:70vh;
    left:90vw;
    transform: rotate(0deg) scale($scale-down);
  }


  25%{
    transform: rotate(-$rotation) translateY(20vh) scale($scale-up);
      }

  37.5%{
    top:40vh;
    left:0vw;
    transform: rotate(0deg) scale($scale-down);    
  }

  50%{
    transform: rotate($rotation) translateY(10vh) scale($scale-up);
  } 

  62.5%{
    top:10vh;
    left:90vw;
    transform: rotate(0deg) scale($scale-down);
  }
  75%{
    transform: rotate(-$rotation) translateY(10vh) scale($scale-up);
      }   
  87.5%{
    top:0;
    left:0vw;
    transform: rotate(0) scale($scale-down);
  }  
  90%{
    opacity:1;
  }  
  100%{
    top:-40vh;
    left:40vw;
    transform: rotate($rotation) translateY(20vh) scale($scale-up);    
  }
}

@keyframes jelly-jar-container{
  0%{
    top:100vh;
    left:60vw;
    opacity:0;
    transform: rotate(-$rotation);
      }    

  .25%{
    opacity:1;
  }

  12.5%{
    top:70vh;
    left:0vw;
    transform: rotate(0deg) scale($scale-down);
  }

  25%{
    transform: rotate($rotation) translateY(20vh) scale($scale-up);
  }

  37.5%{
    top:40vh;
    left:90vw;
    transform: rotate(0deg) scale($scale-down);    
  }

  50%{
    transform: rotate(-$rotation) translateY(10vh) scale($scale-up);
      } 

  62.5%{
    top:10vh;
    left:0vw;
    transform: rotate(0deg) scale($scale-down);
  }
  75%{
    transform: rotate($rotation) translateY(10vh) scale($scale-up);
  }   

  87.5%{
    top:0;
    left:90vw;
    transform: rotate(0) scale($scale-down);
  }

  90%{
    opacity:1;
  }

  100%{
    top:-30vh;
    left:60vw;
    transform: rotate(-$rotation) translateY(20vh) scale($scale-up);    
      }
}

@keyframes jar{
  50%{
    width:10vw;
    height:14vw;
    border-radius:1.5vw;  
  }
}

@keyframes fill-jar{
  0%,100%{
    height:100%;
    border-radius:3vw 3vw 2vw 2vw;
  }
  50%{
    height:10%; 
    border-radius:0 0 .5vw .5vw;
  }
}

@keyframes tendril{
  50%{
    height:2vw;
    width:1.5vw;
    border-radius:100% 100% 2vw 2vw;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console