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.

            
              $g: #41b351;
$b: #323232;
$w: #f2f2f2;
$bl: #CFDEF3;

body{
  display:flex;
  width:100%;
  height:100vh;
  justify-content:center;
  align-items:center;
  perspective:1000px;
  background: linear-gradient(to bottom, #E0EAFC , #CFDEF3 30%);
  &:before{
    content:'';
    position:absolute;
    width:100%;
    height:45%;
    bottom:0;
    background:linear-gradient(to bottom, $g, darken($g, 10%));
    
  }
  &:after{
    content:'';
    position:absolute;
    transform:scaleX(0.15);
    width:800%;
    height:calc(50% + 5px);
    z-index:-1;
    bottom:0;
    animation: walking 6s linear infinite;
    background: 
linear-gradient(135deg, $bl 25%, transparent 25%) -50px 0,
linear-gradient(225deg, $bl 25%, transparent 25%) -50px 0,
linear-gradient(315deg, $bl 25%, transparent 25%),
linear-gradient(45deg, $bl 25%, transparent 25%);	
background-size: 100px 100px;
background-color: $g;
    @keyframes walking {
      0%{ background-position: 0 0;
      }
      50%{ background-position: -50% 0;
      }
      100%{ background-position: -100% 0;
       }
    }
  }
  .totoro{
    position:relative;
    width:130px;
    height:170px;
    z-index:0;
    transform-style:preserve-3d;
    .foot{
      position:absolute;
      width:75px;
      height:20px;
      background:$w;
      z-index:-1;
      bottom:-15px;
      right:-10px;
      transform-origin:0% 50%;
      animation:walk1 0.5s linear infinite alternate;
      &.two{
        animation-delay:-0.5s;
        z-index:-5;
      }
      @keyframes walk1{
        0%{
          transform:translateY(0px) rotate(10deg);
        }
        25%{
          transform:translateY(-15px) rotate(50deg);
        }
        50%{
          transform: translateY(-17px) rotate(90deg);
        }
        75%{
          transform: translateY(-12px) rotate(120deg);
        }
        100%{
          transform: translateY(0px) rotate(150deg);
        }
      }
      &:after{
        content:'';
        position:absolute;
        width:100%;
        height:100%;
        background:$w;
        z-index:2;
      }
      &:before{
        content:'';
        position:absolute;
        width: 20px;
        height: 40px;
        border-radius: 50%/70% 70% 40% 40%;
        box-shadow: 0px 0px 0px 7px $b, 0px 0px 0px 7px $b;
        background:$w;
        right:-10px;
        bottom:-5px;
        transform:rotate(10deg);
        z-index:-1;
      }
    }
    .plant{
      position:absolute;
      width:6.5px;
      height:135px;
      background:$b;
      right:23px;
      top:-56px;
      &:before, &:after{
        content:'';
        position:absolute;
        width: 40px;
        height: 20px;
        border-radius: 0 50% 50% 50%;
        border: 7px solid $b;
        transform: rotate(-10deg) scaleY(-1);
        top:-35px;
        left:0px;
        background:$g;
      }
      &:after{
        transform: rotate(10deg) scaleY(-1) scaleX(-1);
        left:-46px;
        top:-35px;
      }
    }
    .eye{
      position:absolute;
      width:21px;
      height:37px;
      border:6.5px solid $b;
      left:60px;
      top:80px;
      border-radius:700px 900px 700px 700px / 1100px 1100px 1000px 800px;
      animation:blink 10s ease-in-out infinite;
      @keyframes blink{
        0%{
          transform:scaleY(1)
        }
        40%{
          transform:scaleY(1)
        }
        40.5%{
          transform:scaleY(0)
        }
        41%{
          transform:scaleY(1)
        }
        41.5%{
          transform:scaleY(0)
        }
        42%{
          transform:scaleY(1)
        }
      }
      &:before{
        content:'';
        position:absolute;
        width:10px;
        height:14px;
        background:$b;
        right:0;
        top:10px;
        border-radius:500px 0 0 500px;
      }
    }
    .ear{
      position:absolute;
      width:20px;
      height:50px;
      background:$w;
      border-radius:150px 150px 0 0 / 550px 550px 0 0;
      box-shadow:0 10px 0 0 $w, inset 0 -5px 0 0 $w, 0 0 0 6.5px $b;
      transform:skewY(-25deg) rotate(-5deg);
      left:19px;
      top:12px;
      &:nth-of-type(2){
        left:47px;
        transform:skewY(25deg) rotate(-5deg);
        height:33px;
      }
     }
    &:before{
      content:'';
      display:block;
      position:absolute;
      z-index:2;
      left:0;
      top:0;
      width:140px;
      height:170px;
      background:$w;
      margin-top:50px;
      margin-left:-17px;
      box-shadow:0 0 0 6.5px $b;
      border-radius:1000px 1000px 550px 550px / 1650px 1950px 450px 450px;
      transform-style:preserve-3d;
      transform:skewY(-6deg) translateZ(-20px) rotate(-5deg) scaleX(-1);
    }
  }
}
            
          
!
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