Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

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

            
          
!
            
              $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); }
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console