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

HTML

              
                <div class="canvas">
  <div class="burger">
    <div class="shadow"></div>
    <div class="bun top">
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
    </div>
    <div class="tomatoes"></div>
    <div class="patty"></div>
    <div class="bun bottom"></div>
    <div class="lettuce"></div>
    <div class="cheese"></div>
    <div class="cheese_drip"></div>
  </div>
</div>
              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
  background-color: #ff6d32;
}

.canvas {
  width: 100vh;
  height: 100vh;
  max-width: 300px;
  max-height: 300px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.burger {
  position: relative;
  width: 100%;
  height: 100%;
}

.shadow {
  position: absolute;
  bottom: 8%;
  left: 0;
  width: 100%;
  height: 10%;
  background: #a23f18;
  border-radius: 50%;
}

.bun.top {
  position: absolute;
  top: 10%;
  left: 0;
  width: 100%;
  height: 82%;
  background: linear-gradient(#f7bc50 50%, transparent 50%);
  border-radius: 50% 50% 0 0;
  overflow: hidden;
}

.bun.top:before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 43%;
  height: 50%;
  background-color: #e3ac4b;
}

.bun.top span {
  display: block;
  position: absolute;
  width: 2%;
  height: 7%;
  background: #fbd695;
  border-radius: 40%;
}

.top span:nth-child(1) {
  top: 23%;
  left: 15%;
  transform: rotate(30deg);
}

.top span:nth-child(2) {
  top: 30%;
  left: 42%;
  transform: rotate(20deg);
}

.top span:nth-child(3) {
  top: 30%;
  right: 10%;
  transform: rotate(-20deg);
}

.top span:nth-child(4) {
  top: 10%;
  left: 35%;
  transform: rotate(-20deg);
}

.top span:nth-child(5) {
  top: 8%;
  right: 30%;
  transform: rotate(50deg);
}

.top span:nth-child(6) {
  top: 30%;
  right: 35%;
  transform: rotate(-80deg);
}

.top span:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fbd695;
  border-radius: 40%;
}

.top span:nth-child(1):before {
  top: 50%;
  left: 500%;
  transform: rotate(-45deg);
}

.top span:nth-child(2):before {
  top: -200%;
  left: 300%;
  transform: rotate(-45deg);
}

.top span:nth-child(3):before {
  top: 0;
  left: -500%;
  width: 80%;
  height: 80%;
  transform: rotate(90deg);
}

.top span:nth-child(4):before {
  top: 150%;
  left: -350%;
  transform: rotate(90deg);
}

.top span:nth-child(5):before {
    top: 190%;
    left: -700%;
    transform: rotate(40deg);
}

.top span:nth-child(6):before {
    top: 180%;
    left: 500%;
    transform: rotate(40deg);
}

.tomatoes {
  position: absolute;
  top: 51%;
  left: 2%;
  width: 96%;
  height: 3%;
  background: linear-gradient(to right, #bd131d 58%, #970b19 58%);
  border-radius: 10%;
}

.patty {
  position: absolute;
  top: 59%;
  left: 10%;
  width: 80%;
  height: 13%;
  background: linear-gradient(to right, #8c582b 62%, #7e4e29 62%);
}

.patty:before {
  content: '';
  position: absolute;
  top: 0;
  left: -12%;
  width: 15%;
  height: 100%;
  background: #8c582b;
  border-radius: 50% 0 0 50%;
}

.patty:after {
  content: '';
  position: absolute;
  top: 0;
  right: -12%;
  width: 15%;
  height: 100%;
  background: #7e4e29;
  border-radius: 0 50% 50% 0;
}

.lettuce {
  position: absolute;
  top: 72%;
  left: 2%;
  width: 96%;
  height: 2%;
  background: linear-gradient(to right, #9fb331 59%, #8fa22f 59%);
  border-radius: 10%;
}

.lettuce:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 7%;
  height: 220%;
  background: #9fb331;
  border-radius: 0 50%;
}

.lettuce:after {
  content: '';
  position: absolute;
  bottom: -150%;
  right: 23%;
  width: 6%;
  height: 250%;
  background: #8fa22f;
  border-radius: 50% 0;
}

.bun.bottom {
  position: absolute;
  top: 74%;
  left: 10%;
  width: 80%;
  height: 13%;
  background: linear-gradient(to right, #f7bc50 60%, #e3ac4b 60%);
}

.bun.bottom:before {
  content: '';
  position: absolute;
  top: 0;
  left: -12%;
  width: 15%;
  height: 100%;
  background: #f7bc50;
  border-radius: 30% 0 0 50%;
}

.bun.bottom:after {
  content: '';
  position: absolute;
  top: 0;
  right: -12%;
  width: 15%;
  height: 100%;
  background: #e3ac4b;
  border-radius: 0 30% 50% 0;
}

.cheese {
  position: absolute;
  top: 54%;
  left: 2%;
  width: 96%;
  height: 5%;
  background: linear-gradient(to right, #fdde03 59%, #fbc000 59%);
  border-radius: 15%;
}

.cheese:before {
  content: '';
  position: absolute;
  top: 100%;
  right: 20%;
  width: 9%;
  height: 200%;
  background: #fbc000;
  border-radius: 0 0 50% 50%;
  animation: drip 5s ease-in-out infinite;
}

.cheese:after {
  content: '';
  position: absolute;
  bottom: -80%;
  right: 23%;
  width: 20%;
  height: 180%;
  background: linear-gradient(to right, #fdde03 10%, #fbc000 10%);
  border-radius: 0 0 50% 50%;
}

.cheese_drip {
  position: absolute;
  bottom: 11%;
  right: 17%;
  width: 14%;
  height: 3%;
  background: #fbc000;
  border-radius: 50%;
}

.cheese_drip:before {
  content: '';
  position: absolute;
  top: -50%;
  left: 15%;
  width: 60%;
  height: 130%;
  background: #fbc000;
  border-radius: 50%;
}

.cheese_drip:after {
  content: '';
  position: absolute;
  top: -800%;
  left: 30%;
  width: 25%;
  height: 150%;
  background: #fbc000;
  border-radius: 50% 50% 20% 20%;
  animation: drop 5s ease-out infinite;
}

@keyframes drip {
  0%,
  19%,
  100% {
    height: 170%;
  }
  60%,
  75% {
    width: 4%;
    height: 550%;
    right: 22%;
    border-radius: 0 0 10% 10%;
  }
}

@keyframes drop {
  0%,
  85% {
    top: -800%;
  }
  100% {
    top: -50%;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console