cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div class="canvas">
  <div class="jar">
    <div class="top"></div>
    <div class="middle"></div>
    <div class="bottom"></div>
  </div>
  <div class="pencil one">
    <div></div>
  </div>
  <div class="pencil two">
    <div></div>
  </div>
  <div class="pencil three">
    <div></div>
  </div>
</div>
            
          
!
            
              body {
  margin: 0;
  padding: 0;
  background-color: #feb546;
  overflow: hidden;
}

.canvas {
  width: 280px;
  height: 280px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.pencil {
  position: absolute;
  top: 0;
  left: 0;
  width: 5%;
  height: 75%;
  background: linear-gradient(#f8c2c2 8%, #f2f1fb 8%, #f2f1fb 12%, #fed775 12%, #fed775 90%);
  border-radius: 5% 5% 0 0;
}

.pencil.one {
  -webkit-animation: one 12s ease-out infinite;
  animation: one 12s ease-out infinite;
}

.pencil.two {
  -webkit-animation: two 12s ease-out infinite;
  animation: two 12s ease-out infinite;
}

.pencil.three {
  -webkit-animation: three 12s ease-out infinite;
  animation: three 12s ease-out infinite;
}

.pencil:before {
  content: '';
  position: absolute;
  bottom: -14%;
  left: 0;
  border-top: 30px solid #fff2c2;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 0 solid transparent;
}

.pencil div {
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  background-color: rgba(0, 0, 0, .05);
  -webkit-border-radius: 0 5% 0 0;
  border-radius: 0 5% 0 0;
}

.pencil:after {
  content: '';
  position: absolute;
  bottom: -14%;
  left: 30%;
  border-top: 13px solid #666666;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 0 solid transparent;
}

.jar {
  position: absolute;
  left: 80px;
  bottom: 5%;
  width: 120px;
  height: 150px;
  -webkit-opacity: .7;
  opacity: .7;
  -webkit-animation: jar 12s linear infinite;
  animation: jar 12s linear infinite;
}

.jar:before {
  /*   content: ''; */
  position: absolute;
  top: 2%;
  right: 2%;
  z-index: 1;
  width: 30%;
  height: 96%;
  background: rgba(0, 0, 0, .05);
  -webkit-border-radius: 50% 0 10% 0;
  border-radius: 50% 0 10% 0;
}

.jar .top {
  float: left;
  width: 0.1%;
  height: 30px;
  background: linear-gradient(#eee 20%, #daf3fa 90%, #ddd 90%);
  -webkit-border-radius: 10%;
  border-radius: 10%;
  -webkit-animation: top 12s linear infinite;
  animation: top 12s linear infinite;
}

.jar .middle {
  position: relative;
  float: left;
  width: 100%;
  height: 80px;
}

.middle:before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.1%;
  background: #daf3fa;
  -webkit-border-radius: 10% 10% 0 0;
  border-radius: 10% 10% 0 0;
  -webkit-animation: middle 12s linear infinite;
  animation: middle 12s linear infinite;
}

.jar .bottom {
  float: right;
  width: 0.1%;
  height: 30px;
  background: linear-gradient(#daf3fa 90%, #ddd 90%);
  -webkit-border-radius: 0 0 10% 10%;
  border-radius: 0 0 10% 10%;
  -webkit-animation: top 12s linear infinite;
  animation: top 12s linear infinite;
}

@keyframes top {
  0%,
  19% {
    width: 0.01%;
  }
  /*2/12 sec*/
  20% {
    width: 0.01%;
  }
  /*4/12 sec*/
  40% {
    width: 50%;
  }
  /*6/12 sec*/
  60% {
    width: 100%;
  }
  /*8/12 sec*/
  80% {
    width: 100%;
  }
  /*10/12 sec*/
  100% {
    width: 100%;
  }
  /*12/12 sec*/
}

@keyframes middle {
  0%,
  19% {
    height: 0.01%;
  }
  /*2/12 sec*/
  20% {
    height: 0.01%;
  }
  /*4/12 sec*/
  40% {
    height: 50%;
  }
  /*6/12 sec*/
  60% {
    height: 100%;
  }
  /*8/12 sec*/
  80% {
    height: 100%;
  }
  /*10/12 sec*/
  100% {
    height: 100%;
  }
  /*12/12 sec*/
}

@keyframes one {
  0%,
  14% {
    transform: translate(150px, 0) rotate(90deg);
  }
  20% {
    transform: translate(202px, -22px) rotate(75deg);
  }
  21% {
    transform: translate(205px, 8px) rotate(75deg);
  }
  22% {
    transform: translate(208px, -22px) rotate(75deg);
  }
  23% {
    transform: translate(211px, 8px) rotate(75deg);
  }
  24% {
    transform: translate(214px, -22px) rotate(75deg);
  }
  25% {
    transform: translate(217px, 8px) rotate(75deg);
  }
  26% {
    transform: translate(220px, -22px) rotate(75deg);
  }
  27% {
    transform: translate(223px, 8px) rotate(75deg);
  }
  28% {
    transform: translate(226px, -22px) rotate(75deg);
  }
  29% {
    transform: translate(229px, 8px) rotate(75deg);
  }
  30% {
    transform: translate(232px, -22px) rotate(75deg);
  }
  31% {
    transform: translate(235px, 8px) rotate(75deg);
  }
  32% {
    transform: translate(238px, -22px) rotate(75deg);
  }
  33% {
    transform: translate(241px, 8px) rotate(75deg);
  }
  34% {
    transform: translate(244px, -22px) rotate(75deg);
  }
  35% {
    transform: translate(247px, 8px) rotate(75deg);
  }
  36% {
    transform: translate(250px, -22px) rotate(75deg);
  }
  37% {
    transform: translate(253px, 8px) rotate(75deg);
  }
  38% {
    transform: translate(256px, -22px) rotate(75deg);
  }
  39% {
    transform: translate(259px, 8px) rotate(75deg);
  }
  40% {
    transform: translate(262px, -22px) rotate(75deg);
  }
  41% {
    transform: translate(265px, 8px) rotate(75deg);
  }
  42% {
    transform: translate(268px, -22px) rotate(75deg);
  }
  43% {
    transform: translate(271px, 8px) rotate(75deg);
  }
  44% {
    transform: translate(274px, -22px) rotate(75deg);
  }
  45% {
    transform: translate(277px, 8px) rotate(75deg);
  }
  46% {
    transform: translate(280px, -22px) rotate(75deg);
  }
  47% {
    transform: translate(283px, 8px) rotate(75deg);
  }
  48% {
    transform: translate(286px, -22px) rotate(75deg);
  }
  49% {
    transform: translate(289px, 8px) rotate(75deg);
  }
  50% {
    transform: translate(292px, -22px) rotate(75deg);
  }
  51% {
    transform: translate(295px, 8px) rotate(75deg);
  }
  52% {
    transform: translate(298px, -22px) rotate(75deg);
  }
  53% {
    transform: translate(301px, 8px) rotate(75deg);
  }
  54% {
    transform: translate(304px, -22px) rotate(75deg);
  }
  55% {
    transform: translate(307px, 8px) rotate(75deg);
  }
  56% {
    transform: translate(310px, -22px) rotate(75deg);
  }
  57% {
    transform: translate(313px, 8px) rotate(75deg);
  }
  58% {
    transform: translate(316px, -22px) rotate(75deg);
  }
  59% {
    transform: translate(319px, 8px) rotate(75deg);
  }
  60% {
    transform: translate(322px, -22px) rotate(75deg);
  }
  65% {
    transform: translate(180px, -112px) rotate(45deg);
  }
  70%,
  100% {
    transform: translate(160px, 36px) rotate(35deg);
  }
}

@keyframes two {
  0%,
  14% {
    transform: translate(150px, 30px) rotate(90deg);
  }
  20% {
    transform: translate(73px, -12px) rotate(0deg);
  }
  21% {
    transform: translate(193px, -14px) rotate(0deg);
  }
  22% {
    transform: translate(73px, -16px) rotate(0deg);
  }
  23% {
    transform: translate(193px, -18px) rotate(0deg);
  }
  24% {
    transform: translate(73px, -20px) rotate(0deg);
  }
  25% {
    transform: translate(193px, -22px) rotate(0deg);
  }
  26% {
    transform: translate(73px, -24px) rotate(0deg);
  }
  27% {
    transform: translate(193px, -26px) rotate(0deg);
  }
  28% {
    transform: translate(73px, -28px) rotate(0deg);
  }
  29% {
    transform: translate(193px, -30px) rotate(0deg);
  }
  30% {
    transform: translate(73px, -32px) rotate(0deg);
  }
  31% {
    transform: translate(193px, -34px) rotate(0deg);
  }
  32% {
    transform: translate(73px, -36px) rotate(0deg);
  }
  33% {
    transform: translate(193px, -38px) rotate(0deg);
  }
  34% {
    transform: translate(73px, -40px) rotate(0deg);
  }
  35% {
    transform: translate(193px, -42px) rotate(0deg);
  }
  36% {
    transform: translate(73px, -44px) rotate(0deg);
  }
  37% {
    transform: translate(193px, -46px) rotate(0deg);
  }
  38% {
    transform: translate(73px, -48px) rotate(0deg);
  }
  39% {
    transform: translate(193px, -50px) rotate(0deg);
  }
  40% {
    transform: translate(73px, -52px) rotate(0deg);
  }
  41% {
    transform: translate(193px, -54px) rotate(0deg);
  }
  42% {
    transform: translate(73px, -56px) rotate(0deg);
  }
  43% {
    transform: translate(193px, -58px) rotate(0deg);
  }
  44% {
    transform: translate(73px, -60px) rotate(0deg);
  }
  45% {
    transform: translate(193px, -62px) rotate(0deg);
  }
  46% {
    transform: translate(73px, -64px) rotate(0deg);
  }
  47% {
    transform: translate(193px, -66px) rotate(0deg);
  }
  48% {
    transform: translate(73px, -68px) rotate(0deg);
  }
  49% {
    transform: translate(193px, -70px) rotate(0deg);
  }
  50% {
    transform: translate(73px, -72px) rotate(0deg);
  }
  51% {
    transform: translate(193px, -74px) rotate(0deg);
  }
  52% {
    transform: translate(73px, -76px) rotate(0deg);
  }
  53% {
    transform: translate(193px, -78px) rotate(0deg);
  }
  54% {
    transform: translate(73px, -80px) rotate(0deg);
  }
  55% {
    transform: translate(193px, -82px) rotate(0deg);
  }
  56% {
    transform: translate(73px, -84px) rotate(0deg);
  }
  57% {
    transform: translate(193px, -86px) rotate(0deg);
  }
  58% {
    transform: translate(73px, -88px) rotate(0deg);
  }
  59% {
    transform: translate(193px, -90px) rotate(0deg);
  }
  60% {
    transform: translate(73px, -92px) rotate(0deg);
  }
  65% {
    transform: translate(160px, -112px) rotate(45deg);
  }
  70%,
  100% {
    transform: translate(160px, 10px) rotate(35deg);
  }
}

@keyframes three {
  0%,
  14% {
    transform: translate(150px, 60px) rotate(90deg);
  }
  20% {
    transform: translate(65px, 86px) rotate(-75deg);
  }
  21% {
    transform: translate(62px, 116px) rotate(-75deg);
  }
  22% {
    transform: translate(59px, 86px) rotate(-75deg);
  }
  23% {
    transform: translate(56px, 116px) rotate(-75deg);
  }
  24% {
    transform: translate(53px, 86px) rotate(-75deg);
  }
  25% {
    transform: translate(50px, 116px) rotate(-75deg);
  }
  26% {
    transform: translate(47px, 86px) rotate(-75deg);
  }
  27% {
    transform: translate(44px, 116px) rotate(-75deg);
  }
  28% {
    transform: translate(41px, 86px) rotate(-75deg);
  }
  29% {
    transform: translate(38px, 116px) rotate(-75deg);
  }
  30% {
    transform: translate(35px, 86px) rotate(-75deg);
  }
  31% {
    transform: translate(32px, 116px) rotate(-75deg);
  }
  32% {
    transform: translate(29px, 86px) rotate(-75deg);
  }
  33% {
    transform: translate(26px, 116px) rotate(-75deg);
  }
  34% {
    transform: translate(23px, 86px) rotate(-75deg);
  }
  35% {
    transform: translate(20px, 116px) rotate(-75deg);
  }
  36% {
    transform: translate(17px, 86px) rotate(-75deg);
  }
  37% {
    transform: translate(14px, 116px) rotate(-75deg);
  }
  38% {
    transform: translate(11px, 86px) rotate(-75deg);
  }
  39% {
    transform: translate(8px, 116px) rotate(-75deg);
  }
  40% {
    transform: translate(5px, 86px) rotate(-75deg);
  }
  41% {
    transform: translate(2px, 116px) rotate(-75deg);
  }
  42% {
    transform: translate(-1px, 86px) rotate(-75deg);
  }
  43% {
    transform: translate(-4px, 116px) rotate(-75deg);
  }
  44% {
    transform: translate(-7px, 86px) rotate(-75deg);
  }
  45% {
    transform: translate(-10px, 116px) rotate(-75deg);
  }
  46% {
    transform: translate(-13px, 86px) rotate(-75deg);
  }
  47% {
    transform: translate(-16px, 116px) rotate(-75deg);
  }
  48% {
    transform: translate(-19px, 86px) rotate(-75deg);
  }
  49% {
    transform: translate(-22px, 116px) rotate(-75deg);
  }
  50% {
    transform: translate(-25px, 86px) rotate(-75deg);
  }
  51% {
    transform: translate(-28px, 116px) rotate(-75deg);
  }
  52% {
    transform: translate(-31px, 86px) rotate(-75deg);
  }
  53% {
    transform: translate(-34px, 116px) rotate(-75deg);
  }
  54% {
    transform: translate(-37px, 86px) rotate(-75deg);
  }
  55% {
    transform: translate(-40px, 116px) rotate(-75deg);
  }
  56% {
    transform: translate(-43px, 86px) rotate(-75deg);
  }
  57% {
    transform: translate(-46px, 116px) rotate(-75deg);
  }
  58% {
    transform: translate(-49px, 86px) rotate(-75deg);
  }
  59% {
    transform: translate(-52px, 116px) rotate(-75deg);
  }
  60% {
    transform: translate(-55px, 86px) rotate(-75deg);
  }
  65% {
    transform: translate(105px, -112px) rotate(-45deg);
  }
  70%,
  100% {
    transform: translate(105px, 36px) rotate(-35deg);
  }
}

@keyframes jar {
  0%,
  64% {
    z-index: 0;
  }
  65%,
  100% {
    z-index: 2;
  }
}
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console