cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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.

            
              .slice
 .roni
 .eye
 .eye
 .inner
 .mouth
 .nose
 .tip
 .roni.two
 .roni.three
 .roni.four
 .roni.five
 .leg
 .leg.second
 .arm.one
 .arm.two
            
          
!
            
              $b: #1d1f20;
$w: #fff;
$t: rgba(255,255,255,0);

body{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100vw;
  height:100vh;
  position:relative;
  &:before{
    content:'';
    position:absolute;
    width:100%;
    height:50%;
    left:0;
    top:0;
    background:radial-gradient(circle at center, $b 0vmin, $b 0.15vmin, $t 0.15vmin, $t 0.5vmin);
    background-size:0.75vmin 0.75vmin;
    z-index:-10;
    opacity:0.15;
  }
  .slice{
    width:40vmin;
    height:60vmin;
    position:relative;
    animation:bouncing1 1.5s ease-in-out infinite;
    @keyframes bouncing1{
      0%{
         transform:translateY(0); 
      }
      50%{
        transform:translateY(0.5vmin);
      }
      100%{
        transform:translateY(0);
      }
    }
    .arm{
      position:absolute;
      left:0;
      top:15vmin;
      width:7.5vmin;
      height:10vmin;
      box-shadow:-1vmin -1vmin 0 0 $b, -1vmin 1vmin 0 0 $b, -1.25vmin 0 0 0.5vmin $b, inset 0 1vmin 0 0 $b;
      z-index:-5;
      border-radius:200% 0 0 200% / 100% 0 0 100%;
      &.two{
        left:35vmin;
        transform:scaleY(-1) scaleX(-1) rotate(50deg);
        animation:waving 3s ease-in-out infinite;
        @keyframes waving{
          0%{
            transform:scaleY(-1) scaleX(-1) rotate(50deg);
            width:7.5vmin;
          } 
          50%{
            transform-origin:0% 50%;
            transform:scaleY(-1) scaleX(-1) rotate(60deg) translatex(-10vmin) translateY(0vmin);
          }
          100%{
            transform:scaleY(-1) scaleX(-1) rotate(50deg);
            width:7.5vmin;
          }
        }
        &:before{
          width:9vmin;
          transform:rotate(35deg)
        }
        &:after{
          box-shadow:inset 0 1vmin 0 0 $b;
          bottom:1vmin;
          transform:rotate(-20deg);
          width:3.5vmin;
          height:2.5vmin;
        }
      }
      &:before{
        content:'';
        position:absolute;
        height:6vmin;
        width:7vmin;
        background:$w;
        border:1vmin solid $b;
        bottom:-6vmin;
        border-radius:100% 100% 100% 100%;
        transform:rotate(20deg);
      }
      &:after{
        content:'';
        position:absolute;
        width:3vmin;
        height:2vmin;
        background:$w;
        bottom:0.25vmin;
        left:4vmin;
        border-radius:100%;
        transform:rotate(20deg);
        box-shadow:inset 0 -1vmin 0 0 $b;
      }
    }
    .leg{
      position:absolute;
      left:24vmin;
      bottom:0;
      height:15vmin;
      width:7.5vmin;
      border-radius:0 10vmin 0 0;
      box-shadow:1.5vmin -2vmin 0 0 $b;
      animation:bouncing2 1.5s ease-in-out infinite;
      @keyframes bouncing2{
        0%{
          height:15vmin;
        }
        50%{
          height:14.75vmin;
        }
        100%{
          height:15vmin;
        }
      }
      &:after{
        content:'';
        position:absolute;
        width:7.5vmin;
        height:3vmin;
        background:$b;
        bottom:0;
        left:100%;
        border-radius:0 10vmin 10vmin 10vmin;
      }
      &.second{
        left:10vmin;
        transform:scaleX(-1);
      }
    }
    .roni{
      position:absolute;
      width:5vmin;
      height:10vmin;
      background:radial-gradient(circle at center, $b 0vmin, $b 0.15vmin, $t 0.15vmin, $t 0.5vmin);
      background-size:0.75vmin 0.75vmin;
      border-radius:0 100% 100% 0 / 0 50% 50% 0;
      top:6vmin;
      left:3.5vmin;
      transform:rotate(-17.5deg);
      &.two{
        top:30vmin;
        width:3vmin;
        left:11vmin;
      }
      &.three{
        width:10vmin;
        height:10vmin;
        border-radius:500%;
        top:36vmin;
        left:17vmin;
      }
      &.four, &.five{
        width:9vmin;
        height:9vmin;
        border-radius:500%;
        top:17vmin;
        left:11vmin;        
      }
      &.five{
        top:3vmin;
        left:25vmin;
      }
      
    }
    &:before{
      content:'';
      position:absolute;
      width:42vmin;
      height:10vmin;
      border:1vmin solid $b;
      top:-11vmin;
      left:-2vmin;
      z-index:2;
      background:$w;
      border-radius:2vmin;
      transform:rotate(-2deg);
      background:radial-gradient(circle at center, $b 0vmin, $b 0.15vmin, $w 0.15vmin, $w 0.5vmin);
      background-size:0.75vmin 0.75vmin;
    }
    .nose{
      position:absolute;
      width:3vmin;
      height:2vmin;
      border-top:1vmin solid $b;
      top:18vmin;
      left:26vmin;
      border-radius:100vmin;
      
    }
    .tip{
      position:absolute;
      width:12vmin;
      height:10vmin;
      bottom:5.6vmin;
      left:15.2vmin;
      border:0.85vmin solid;
      border-color:$t $t $t $b;
      border-radius:0 0 0 100%;
      transform:rotate(-18deg);
      z-index:-5;
      &:before{
        content:'';
        position:absolute;
        width:5vmin;
        height:5vmin;
        bottom:0vmin;
        left:8vmin;
        border:0.85vmin solid;
        border-color:$w $w $w $b;
        border-radius:0 0 0 150%;
        transform:rotate(35deg); 
        z-index:-1;
      }
    }
    .mouth{
      position:absolute;
      width:15vmin;
      height:10vmin;
      background:$b;
      left:16.75vmin;
      top:21vmin;
      z-index:3;
      border-radius:0 0 100% 100% / 0 0 200% 200%;
      border:0.75vmin solid $b;
      overflow:hidden;
      &:before, &:after{
        content:'';
        width:10vmin;
        height:10vmin;
        border-radius:500%;
        background:$w;
        position:absolute;
        top:6vmin;
        left:-1vmin;
        z-index:2;
        
      }
      &:after{
        z-index:1;
        top:6.5vmin;
        left:4vmin;
      }
    }
    .eye{
      position:absolute;
      width:5vmin;
      height:6vmin;
      border:1vmin solid $b;
      z-index:3;
      border-radius:250%;
      left:17vmin;
      top:10vmin;
      background:$w;
      box-shadow:0 -2vmin 0  0.5vmin $w, 0 -3.5vmin 0 $b;
      overflow:hidden;
      &:nth-of-type(2){
        left:30vmin;
      }
      &:before{
        content:'';
        position:absolute;
        width:3vmin;
        height:7vmin;
        background:$b;
        border-radius:500%;
        left:-0.5vmin;
        top:1vmin;
        animation:looking 4s linear infinite;
        @keyframes looking{
          0%{
            transform:translateX(0)
          }
          50%{
            transform:translateX(2vmin)
          }
          100%{
            transform:translateX(0)
          }
        }
      }
      &:after{
        content:'';
        position:absolute;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0.75vmin 1.8vmin 0.75vmin 0;
        top:3vmin;
        left:1vmin;
        border-color: transparent $w transparent transparent;
        animation:looking 4s linear infinite;
      }
    }
    .inner{
        z-index:-1;
        position:absolute;
        left:0;
        top:0;
        width:100%;
        height:calc(100% - 15vmin);
        overflow:hidden;
      &:after{
        content:'';
        position:absolute;
        left:0;
        top:0;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 65vmin 20vmin 0 20vmin;
        border-color: $b transparent transparent transparent;
      }
      &:before{
        content:'';
        position:absolute;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 61vmin 19vmin 0 19vmin;
        border-color: $w transparent transparent transparent;
        left:1vmin;
        top:1vmin;
        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