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

              
                <div id="candle">
  <div id="wax"></div>
  <div id="flame"></div>
</div>

              
            
!

CSS

              
                html {
  width:100vw;
  height:100vh;
  background:#111;
  overflow:hidden;
}

#candle {
  width:150px;
  height:50vh;
  position:absolute;
  bottom:0;
  left:45%;
  background:linear-gradient(to top right, crimson, tomato);  
  transform-origin:bottom center;
  animation:melt 30s linear infinite;
}
@keyframes melt {
  90% { bottom:-50vh; opacity:1; }
  93% { bottom:-50vh; opacity:0; }
  100% { bottom:-50vh; opacity:0; }
}

#candle:before {
  content:'';
  position:absolute;
  left:0;
  top:-12px;
  width:100%;
  height:24px;
  background:crimson;
  border-radius:50%;
  box-shadow:inset 0px 5px 1px tomato;
}

#candle:after {
  content:'';
  position:absolute;
  left:46%;
  top:-30px;
  width:10px;
  height:35px;
  background:linear-gradient(45deg, saddlebrown 25%, peru 50%, saddlebrown 50%);
  background-size:100% 20%;
  border-radius:10px 10px 0px 0px;
}

#wax {
  width:20%;
  height:40%;
  background:crimson;
  border-radius:0% 0% 50px 50px;
  margin-left:5%;
  position:relative;  
}
#wax:before {
  width:100%;
  height:150%;
  background:crimson;
  border-radius:0% 0% 50px 50px;
  content:'';
  position:absolute;
  left:100%;
}
#wax:after {
  width:100%;
  height:75%;
  background:crimson;
  border-radius:0% 0% 50px 50px;
  content:'';
  position:absolute;
  left:350%;
}

#flame {
  width:125px;
  height:125px;  
  position:absolute;
  left:50%;
  top:-100px;
  border-radius:50% 0% 50% 50%;
  transform:rotate(-45deg);
  z-index:99;
  background:radial-gradient(circle at 25% 75%, transparent 10%, yellow, orange, orangered, red);
  animation:burn 2s linear infinite;
  transform-origin:bottom left;
}

@keyframes burn {
  50% { transform:rotate(-45deg) scale(1.075); opacity:.85; }
}

#flame:before {
  content:'';
  position:absolute;
  left:-11vw;
  top:-15vw;
  width:35vw;
  height:35vw;
  background:radial-gradient(circle, transparent 25%, yellow 50%, rgba(255,255,0,.2) 65%);
  border-radius:50%;
  transform:rotate(45deg);
  opacity:.5;
  filter:blur(50px);
}
#flame:after {
  content:'';
  position:absolute;
  left:-32.5vw;
  top:-35vw;
  width:75vw;
  height:75vw;
  background:radial-gradient(circle, transparent 25%, yellow 50%, rgba(255,255,0,.2) 65%);
  border-radius:50%;
  transform:rotate(45deg);
  opacity:.15;
  filter:blur(25px);
}
              
            
!

JS

              
                // nothing to see here
              
            
!
999px

Console