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

              
                <div class="container">
  <svg class="bottle" viewBox="0 0 80 189" 
    x="0px" y="0px" width="400px" height="189px"
  >
    <g id="bottle" class="bottle-1">
      <path d="M 23.2375 23 C 23.1028 34.2607 2 38.4185 0 47.4185 L 0 90.5 C 0 94.8936 10.0635 102.312 10.0635 108.312 C 10.0635 115.312 2.0115 120.584 1 124.4946 L 1 182.5 C 1 186.8726 22.217 188.647 40.566 188.647 C 58.9149 188.647 79 186.7837 79 182.5 L 79 124.4946 C 77.9885 120.584 70.4365 115.312 70.4365 108.312 C 70.4365 102.312 80 94.8936 80 90.5 L 80 47.4185 C 78 38.4185 56.8972 34.2607 56.7625 23 L 23.2375 23 ZM 76 130.5 L 76 168.5 C 54.0071 171.8901 24.5178 171.7129 5 168.5 L 5 130.5 C 24.0745 133.9468 57.11 134.124 76 130.5 Z" />
      <rect x="17" y="0" width="45" height="20"  rx="5" ry="5"/>    
    </g>
    <use class="bottle-2" xlink:href="#bottle" x="0" y="0" />
    <use class="bottle-3" xlink:href="#bottle" x="0" y="0" />
    <use class="bottle-4" xlink:href="#bottle" x="0" y="0" />
  </svg>
</div>

              
            
!

CSS

              
                $background: #272727;
$main: #65bad7;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: $background;  
}

.container {
  height: 325px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bottle {
  fill: $main;
  &-1 {
    transform: translate(-150px);
  }
  &-2 {
    animation: bottle-2 1s ease forwards;
  }
  &-3 {
    animation: bottle-3 1s ease forwards;
  }
  &-4 {
    animation: bottle-4 1s ease forwards;

  }
}

@keyframes bottle-2 {
  to { transform: translate(100px); }
}
@keyframes bottle-3 {
  to { transform: translate(200px); }
}
@keyframes bottle-4 {
  to { transform: translate(300px); }
}

              
            
!

JS

              
                
              
            
!
999px

Console