cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

            
              .toots
 - (1..5).each do |i|
  %div.toot #{}
.poo
 .top
 .mid
 .bottom
 .eyes
  .eye
  .eye
 .mouth
 
 <!-- based on a shot by Yasir Eryılmaz : https://dribbble.com/shots/3409721-Gummy-Monsters-Poop -->
            
          
!
            
              $p: #a02163;
$p2: #9b1f63;
$o: #c74b56;
$w: #fff;
$l: #fcf0f8;
$b: #000000;
$t: rgba(255,255,255,0);
$bl: #d9cef3;
$pi:#e6b4cc;

body{
  display:flex;
  width:100%;
  height:100vh;
  justify-content:center;
  align-items:center;
  background:$l;
  &:before{
    content:'';
    position:absolute;
    width:275px;
    height:20px;
    background:linear-gradient(to right, $bl, $pi);
    left:50%;
    top:50%;
    transform:translateX(-50%) translateY(-50%);
    margin-top:125px;
    border-radius:100%;
  }
  .toots{
    width:300px;
    height:300px;
    position:absolute;
    left:50%;
    top:50%;
    margin-top:-100px;
    transform:translateX(-50%) translateY(-50%);
    z-index:-1;
    .toot{
      position:absolute;
      width:30px;
      height:30px;
      left:50%;
      bottom:0;
      transform:translateX(-50%);
      border-radius:100%;
      transform-origin:50% 100%;
      &:nth-of-type(2){
        transform:rotate(45deg);
        width:20px;
        height:20px;
        &:before{
          background:$bl;
        }
      }
      &:nth-of-type(3){
        transform:rotate(-45deg);
        width:15px;
        height:15px;
        &:before{
          background:$p2;
        }
      }
      &:nth-of-type(4){
        transform:rotate(-90deg);
        width:15px;
        height:15px;
        &:before{
          background:$bl;
        }
      }
      &:nth-of-type(5){
        transform:rotate(90deg);
        width:15px;
        height:15px;
        &:before{
          background:$bl;
        }
      }
      &:before{
        content:'';
        position:absolute;
        width:100%;
        height:100%;
        border-radius:500%;
        background:$p;
        animation:burst 5s ease-out infinite;
        @keyframes burst{
          0%{
            transform:translateY(0);
          }
          82%{
            transform:translateY(0);
          }
          88%{
            transform:translateY(-300px);
            opacity:1;
          }
          92%{
            transform:translateY(-320px);
            opacity:0;
          }
          100%{
            opacity:0;
          }
        }
      }
    }
  }
  .poo{
    position:relative;
    width:300px;
  }
  .top, .mid, .bottom{
    animation:swell 5s ease-in-out infinite;
    transform-origin:50% 100%;
    @keyframes swell{
        0%{
          transform:scaleY(1) scaleX(1);
        }
        50%{
          transform:scaleY(1) scaleX(1);
        }
        70%{
          transform:scaleY(1.25) scaleX(0.96);
        }
        80%{
          transform:scaleY(1.25) scaleX(0.96);
        }
        85%{
          transform:scaleY(0.96) scaleX(1);
        }
        88%{
          transform:scaleY(1.05) scaleX(1);
        }
        90%{
          transform:scaleY(1) scaleX(1);
        }
        100%{
          transform:scaleY(1) scaleX(1);
        }
      }
  }
  .top{
    width:150px;
    height:80px;
    background:linear-gradient(to top, $p, $o 50%);
    margin-left:75px;
    margin-bottom:-10px;
    border-radius:50px;
    position:relative;
    z-index:0;
    &:before{
      content:'';
      position:absolute;
      width: 0;
      height: 0;
      width: 0;
      height: 0;
      border-style: solid;
      border-width: 0 0 75px 75px;
      border-color: transparent transparent $o transparent;
      right:0px;
      top:-40px;
    }
    &:after{
      content:'';
      position:absolute;
      width:10px;
      height:17.5px;
      background:$l;
      border-radius:50px;
      z-index:9;
      right:10px;
      top:20px;
      transform:rotate(5deg);
    }
  }
  .mid{
    width:250px;
    height:75px;
    margin-left:25px;
    background:linear-gradient(45deg, $p, $o);
    border-radius:50px;
    position:relative;
    z-index:1;
    margin-bottom:-5px;
  }
  .bottom{
    width:300px;
    height:100px;
    background:linear-gradient(45deg, $p, $o);
    border-radius:50px;
    position:relative;
    z-index:2;
  }
  .eyes, .mouth{
    position:absolute;
    left:50%;
    top:50%;
    transform:translateX(-50%) translateY(-50%);
    width:300px;
    height:100px;
    z-index:3;
      .eye{
      width:85px;
      height:85px;
      position:absolute;
      background:linear-gradient(to bottom, $w, $l);
      z-index:9;
      border-radius:500%;
      top:25px;
      left:55px;
      transform-style:preserve-3d;
      animation:rise 5s ease-in-out infinite;
      @keyframes rise{
        0%{
          transform:translateY(0);
        }
        50%{
          transform:translateY(0);
        }
        70%{
          transform:translateY(-15px);
        }
        80%{
          transform:translateY(-15px);
        }
        85%{
          transform:translateY(2px);
        }
        88%{
          transform:translateY(0);
        }
        100%{
          transform:translateY(0);
        }
      }
        &:after{
          content:'';
          position:absolute;
          width:60px;
          height:40px;
          border-radius:500px;
          background:$p;
          bottom:-25px;
          left:-25px;
          transform:translateZ(-100px);
        }
        &:before{
          content:'';
          position:absolute;
          left:50%;
          top:50%;
          transform:translateX(-50%) translateY(-50%);
          width:60px;
          height:60px;
          border-radius:500%;
          background:$b;
          animation:oface3 5s ease-in-out infinite;
          @keyframes oface3{
            0%{
              transform:translateX(-50%) translateY(-50%);
            }
            60%{
              transform:translateX(-50%) translateY(-50%);
            }
            62%{
              transform:translateX(-50%) translateY(-50%) scaleY(0.25);
            }
            64%{
              transform:translateX(-50%) translateY(-50%);
            }
            82%{
              transform:translateX(-50%) translateY(-50%);
            }
            84%{
              transform:translateX(-50%) translateY(-50%) scaleY(0.25);
            }
            86%{
              transform:translateX(-50%) translateY(-50%);
            }
          }
        }
      &:nth-of-type(2){
        left:auto;
        right:55px;
        &:after{
          left:auto;
          right:-25px;
        }
      }
    }
  }
  .eyes{
    &:before{
      content:'';
      position:absolute;
      left:50%;
      transform:translateX(-50%);
      width:14px;
      height:14px;
      background:$b;
      bottom:-34px;
      border-radius:100%;
      animation:oface 5s ease-in-out infinite;
      transform-origin:50% 90%;
      @keyframes oface{
        0%{
          transform:translateX(-50%);
        }
        50%{
          transform:translateX(-50%) scale(1);
        }
        60%{
          transform:translateX(-50%) scale(3);
        }
        70%{
          transform:translateX(-50%) scale(3) scaleY(1.25);
        }
        80%{
          transform:translateX(-50%) scale(3) scaleY(1.25);
        }
        82%{
          transform:translateX(-50%) scale(1);
        }
        100%{
          transform:translateX(-50%) scale(1);
        }
      }
    }
  }
  .mouth{
    width:50px;
    height:50px;
    border:15px solid;
    border-radius:500%;
    border-color:$t $t $b $t;
    margin-top:45px;
    animation:oface2 5s ease-in-out infinite;
    transform-origin:50% 0%;
      @keyframes oface2{
        0%{
          width:50px;
        }
        50%{
          width:50px;
        }
        55%{
          width:0px;
        }
        70%{
          width:0px;
        }
        80%{
          width:0px;
          margin-top:45px;
        }
        82%{
          width:50px;
          margin-top:46px;
        }
        90%{
          width:50px;
          margin-top:45px;
        }
        100%{
          width:50px;
        }
      }
    &:before, &:after{
      content:'';
      position:absolute;
      width:15px;
      height:15px;
      background:$b;
      bottom:-5px;
      left:-5px;
      border-radius:500%;
    }
    &:after{
      left:auto;
      right:-5px;
    }
  }
}
            
          
!
999px
Loading ..................

Console