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

Quick-add: + add another resource

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.

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.

            
              .container
  .head
    .start
    .colorful
    .eye
  .body
    .back
    .neck
  .branch
    .bigLeaf
    .smallLeaf
    .stem
  .tail
    
    
            
          
!
            
              @blue: #1fbee5;
@pink: #e8739f;
@orange: #e35b24;
@yellow: #f8c612;
@grey: #e1e0de;
@green: #45af35;

body {
  margin: 0;
  padding: 0;
}

.container {
  position: absolute;
  top: 42%; 
  left: 50%; /*center based on top left pixel */
  transform: translate(-50%, -50%); /* centers the topleft pixel */
}

.head {
  display: flex; /* puts stuff side by side */
  justify-content: flex-end;
}

.start {
  width: 140px;
  height: 140px;
  background: black;
  border-top-left-radius: 100%; /* 100% round */
  border-top: 35px solid @blue;
  box-sizing: border-box; /* borders on the inside on container */
  border-left: 35px solid @blue;
}

.colorful {
  width: 140px;
  height: 140px;
  display: flex;
  background: @pink;
  align-items: flex-end;
  &::before {
    display: block; /* makes it visible, real element */
    content: ""; /* empty str otherwise expects text */
    background: @orange;
    width: 140px;
    height: 105px;
  }
  &::after {
    display: block;
    content: "";
    background: @yellow;
    width: 140px;
    height: 105px;
  }
}

.eye {
  position: relative;
  width: 140px;
  height: 140px;
  border-top-right-radius: 100%; /* 100% round */
  border-top: 35px solid black;
  box-sizing: border-box; /* borders on the inside */
  border-right: 35px solid black;
  &::before {
    display: block;
    content: "";
    background: black;
    width: 35px;
    height: 35px;
    position: absolute;
    top: 55px;
    left: 25px;
    border-radius: 100%;
  }
  &::after {
    display: block;
    content: "";
    background: white;
    width: 50px;
    height: 38px;
    position: absolute;
    top: 15px;
    left: 18px;
    border-radius: 100%;
    animation: 3.5s blink infinite;
  }
}

.body {
  display: flex;
  justify-content: flex-end; /* align items is up-down, justidy content is right-left */
}

.back {
  width: 140px;
  height: 140px;
  background: black;
  border-top-left-radius: 100%;
}

.neck {
  width: 140px;
  height: 140px;
  background: @grey;
  border-bottom-right-radius: 100%; /* 100% round */
  border-bottom: 35px solid black;
  box-sizing: border-box; /* borders on the inside */
  border-right: 35px solid black;
}

.branch {
  display: flex;
  position: relative;
}

.stem {
  width: 420px;
  height: 40px;
  background: @green;
  box-sizing: border-box;
  border-bottom: 20px solid black;
}

.bigLeaf {
  width: 105px;
  height: 105px;
  background: @green;
  border-top-left-radius: 52%;
  border-bottom-right-radius: 52%;
  position: absolute;
  top: 40px;
  left: -105px;
  transform-origin: top right;
  animation: 5s rustle infinite;
  &::before {
    display: block;
    content: "";
    background: @blue;
    width: 50px;
    height: 50px;
    position: absolute;
    bottom: 0;
    z-index: 1;
  }
  &::after {
    display: block;
    content: "";
    position: relative;
    border-top: 52.5px solid transparent;
    border-left: 52.5px solid transparent;
    border-bottom: 52.5px solid black;
    border-right: 52.5px solid black;
    border-bottom-right-radius: 49%;
    z-index: 2; /* z-index only works if you put position */
  }
}

.smallLeaf {
  width: 70px;
  height: 70px;
  background: @blue;
  border-top-right-radius: 52%;
  border-bottom-left-radius: 52%;
  position: absolute;
  bottom: 40px;
  left: -70px;
  transform-origin: bottom right;
  animation: 4s rustle infinite;
  &::before {
    display: block;
    content: "";
    background: @green;
    width: 35px;
    height: 35px;
    position: absolute;
    z-index: 1;
  }
  &::after {
    display: block;
    content: "";
    position: relative;
    border-top: 35px solid transparent;
    border-left: 35px solid black;
    border-bottom: 35px solid black;
    border-right: 35px solid transparent;
    border-bottom-left-radius: 50%;
    bottom: 0;
    z-index: 2; /* z-index only works if you put position */
  }
}

.tail {
  width: 0;
  border-top: 67px solid transparent;
  border-left: 75px solid black;
  border-bottom: 67px solid black;
  border-right: 75px solid transparent;
  position: absolute;
  left: 140px;
  bottom: -110px;
  z-index: -1;
}

@keyframes rustle {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(20deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@keyframes blink {
  50% {
    top: 17px;
  }
  65% {
    top: 55px;
  }
  80% {
    top: 17px;
  }
}

            
          
!
            
              //Inspired by https://dribbble.com/shots/3706929-Toucan
            
          
!
999px
Loading ..................

Console