Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container">
<div class="person">
  <div class="head">
    <div class="headDetails"></div>
  </div>
  <div class="hair">
    <div class="hairDetails"></div>
  </div>
  <div class="helmet"></div>
  <div class="chinStrap"></div>
  <div class="top"></div>
  <div class="arm">
    <div class="foreArm"></div>
  </div>
  <div class="hand"></div>
  <div class="pants"></div>

  <div class="leftLeg">
    <div class="leftCalf">
      <div class="foot"></div>
    </div>
  </div>
  <div class="rigthLeg">
    <div class="rigthCalf">
      <div class="foot"></div>
    </div>
  </div>

  <div class="bike">

    <div class="bikeFrame">
      <div class="tubeTop"></div>
      <div class="tubeDown"></div>
      <div class="tubeHead"></div>
      <div class="tubeSeat"></div>
      <div class="tubeStay"></div>
      <div class="tubeChainStay"></div>
    </div>

    <div>
      <div class="fork"></div>
      <div class="forkStem"></div>
      <div class="stem"></div>
      <div class="handleBar"></div>

      <div class="seatPost"></div>
      <div class="seat"></div>

      <div class="cranckSet"></div>
      <div class="cranckCenter"></div>
      <div class="cranckLeft"></div>
      <div class="cranckRight"></div>
      <div class="pedalLeft"></div>
      <div class="pedalRight"></div>

      <div class="chainTop"></div>
      <div class="chainBottom"></div>
      <div class="casset"></div>
    </div>

    <div class="wheel wheelBack">
      <div class="spoke"></div>
      <div class="spoke"></div>
      <div class="spoke"></div>
      <div class="spoke"></div>
    </div>

    <div class="wheel wheelFront">
      <div class="spoke"></div>
      <div class="spoke"></div>
      <div class="spoke"></div>
      <div class="spoke"></div>
    </div>
  </div>
</div>
</div>
              
            
!

CSS

              
                $frame-color: #ccc;
$fork-color: #111;
$spoke-color: #eee;
$tire-color: #333;
$wheel-color: #ddd;

$skin-color: #F2CDB8;
$skinDecor-color: #F4AAA8;
$skinShadow-color: #f1c4aa;
$eye-color: #333;
$hair-color: #FBBC57;
$eyebrown-color: #ecae49;

$shirtPrimary-color: #e25f5f;
$shirtSecondary-color: #d44e4e;

$pantsPrimary-color: #5353cf;
$pantsSecondary-color: #3030bb;

$footPrimary-color: rgb(92, 47, 21);
$footSecondary-color: rgb(68, 33, 13);

$sockPrimary-color: #ddd;
$sockSecondary-color: rgb(199, 199, 199);
$ring-color: rgb(182, 182, 182);

$speed: 4;

* {
    box-sizing: border-box;
}

.container{
  position: absolute;
  top:100%;
  left:20%;
  transform: scale(1.3);
}

.person {
    position: absolute;
    height: 200px;
    width: 300px;
    bottom: 12px;
    left: -10px;
    animation: ride 1s linear infinite;
    z-index: 0;

    .head {
        position: absolute;
        height: 50px;
        width: 40px;
        top: -60px;
        left: 175px;
        background-color: $skin-color;
        border-bottom-right-radius: 15px;
        border-bottom-left-radius: 50%;
        z-index: 15;
        transform: rotate(5deg);
        transform-origin: bottom left;

        // EYE
        &::before {
            content: "";
            position: absolute;
            height: 5px;
            width: 3px;
            top: 18px;
            left: 35px;
            background-color: $eye-color;
            border-radius: 5px;
            z-index: 10;
        }

        // CHEEK
        &::after {
            content: "";
            position: absolute;
            height: 12px;
            width: 10px;
            top: 26px;
            left: 25px;
            background-color: $skinDecor-color;
            border-radius: 5px;
            z-index: 10;
            transform: rotate(-70deg);
        }

        .headDetails {

            // NOSE
            position: absolute;
            height: 8px;
            width: 8px;
            top: 23px;
            left: 36px;
            background-color: $skin-color;
            border-radius: 5px;
            z-index: 15;

            //EYEBROW
            &::before {
                content: "";
                position: absolute;
                height: 10px;
                width: 3px;
                top: -15px;
                left: -1px;
                background-color: $eyebrown-color;
                border-radius: 20px;
                transform: rotate(90deg);
            }

            //NECK
            &::after {
                content: "";
                position: absolute;
                height: 20px;
                width: 25px;
                top: 6px;
                left: -46px;
                background-color: $skin-color;
                border-radius: 20px;
                transform: rotate(-90deg);
            }
        }
    }

    .hair {
        position: absolute;
        top: -62px;
        left: 148px;
        height: 32px;
        width: 70px;
        border-top-right-radius: 89%;
        border-top-left-radius: 100%;
        border-bottom-right-radius: 30%;
        border-bottom-left-radius: 200%;
        background-color: $hair-color;
        z-index: 20;
        transform: rotate(-60deg);

        // EAR
        &::before {
            content: "";
            position: absolute;
            top: 26px;
            left: 30px;
            height: 8px;
            width: 10px;
            border-radius: 5px;
            background-color: $skin-color;
            z-index: 20;
        }

        // TEMPORAL HAIR
        &::after {
            content: "";
            position: absolute;
            top: 27px;
            left: 39px;
            height: 12px;
            width: 15px;
            border-radius: 5px;
            background-color: $hair-color;
            z-index: 10;
        }

        .hairDetails {
            position: absolute;
            top: -20px;
            left: 00px;
            height: 40px;
            width: 28px;
            border-radius: 30px;
            //background-color: $hair-color;
            z-index: 15;
            transform: rotate(-60deg);
        }
    }

    .helmet {
        position: absolute;
        height: 32px;
        width: 60px;
        top: -80px;
        left: 168px;
        background-color: $fork-color;
        border-top-right-radius: 80%;
        border-top-left-radius: 60%;
        border-bottom-right-radius: 40%;
        border-bottom-left-radius: 30%;
        z-index: 30;
        transform: rotate(3deg);

        &::after {
            content: "";
            position: absolute;
            height: 8px;
            width: 19px;
            top: 3px;
            left: 30px;
            background-color: $tire-color;
            border-radius: 20px;
            transform: rotate(15deg);
        }
    }

    .chinStrap {
        position: absolute;
        height: 35px;
        width: 5px;
        top: -55px;
        left: 183px;
        background-color: $tire-color;
        border-radius: 5px;
        z-index: 20;
        transform: rotate(-35deg);

        &::after {
            content: "";
            position: absolute;
            height: 40px;
            width: 5px;
            top: 4px;
            left: 17px;
            background-color: $tire-color;
            border-radius: 20px;
            transform: rotate(55deg);
        }

        &::before {
            content: "";
            position: absolute;
            height: 18px;
            width: 6px;
            top: 33px;
            left: -4px;
            background-color: $tire-color;
            border-radius: 20px;
            transform: rotate(30deg);
        }
    }

    .top {
        position: absolute;
        height: 75px;
        width: 80px;
        top: -32px;
        left: 100px;
        border-top: 30px solid $shirtPrimary-color;
        border-left: 40px solid $shirtPrimary-color;

        border-top-left-radius: 100%;
        border-top-right-radius: 0%;
        border-bottom-right-radius: 80%;
        z-index: 10;

        // GOLA
        &::before {
            content: "";
            position: absolute;
            height: 18px;
            width: 15px;
            top: -17.5px;
            left: 28px;
            background-color: $shirtPrimary-color;
            border-radius: 20px;
        }
    }

    .arm {
        position: absolute;
        height: 48px;
        width: 15px;
        top: -10.5px;
        left: 165px;
        z-index: 15;
        background-color: $skin-color;

        border-bottom-left-radius: 30%;
        transform: rotate(-30deg);
        transform-origin: center left;

        &::before {
            content: "";
            position: absolute;
            height: 30px;
            width: 20px;
            top: -10px;
            left: -3px;
            border-top-left-radius: 10px;
            border-top-right-radius: 10px;
            border-bottom-left-radius: 3px;
            border-bottom-right-radius: 3px;
            background-color: $shirtSecondary-color;
        }

        .foreArm {
            content: "";
            position: absolute;
            height: 48px;
            width: 15px;
            top: 35px;
            left: 4px;
            border-top: 48px solid $skin-color;
            border-left: 3px solid transparent;
            border-right: 2px solid transparent;
            border-top-left-radius: 50%;
            transform: rotate(-20deg);
            transform-origin: center left;
        }
    }

    .hand {
        position: absolute;
        height: 28px;
        width: 15px;
        top: 32.5px;
        left: 220px;
        background-color: $skin-color;
        border-top-left-radius: 50%;
        border-top-right-radius: 30%;
        border-bottom-left-radius: 20%;
        border-bottom-right-radius: 30%;
        transform: rotate(115deg);
        transform-origin: center left;

        &::after {
            content: "";
            position: absolute;
            height: 2px;
            width: 4px;
            top: 7px;
            left: 7px;
            background-color: $ring-color;
            border-radius: 1px;
        }

    }

    .pants {
        position: absolute;
        height: 40px;
        width: 38px;
        top: 26.5px;
        left: 100px;
        border-top-left-radius: 50%;
        border-top-right-radius: 30%;
        border-bottom-left-radius: 50%;
        border-bottom-right-radius: 80%;
        background-color: $pantsPrimary-color;
        z-index: 5;

    }

    .leftLeg {
        position: absolute;
        height: 23px;
        width: 75px;
        top: 42px;
        left: 110px;
        border-radius: 30px;
        background-color: $pantsPrimary-color;
        transform-origin: center left;
        z-index: 10;
        animation: Legcycle 1s linear infinite reverse;
        animation-delay: 0.75s;

        .leftCalf {
            position: absolute;
            height: 17px;
            width: 75px;
            top: -3px;
            left: 65px;
            border-radius: 30px;
            transform: rotate(115deg);
            background-color: $pantsPrimary-color;
            transform-origin: center left;
            animation: CalfCycle 1s linear infinite reverse;
            animation-delay: 0.75s;

            //SKIN
            &::after {
                content: "";
                position: absolute;
                height: 17px;
                width: 20px;
                top: 0px;
                left: 50px;
                border-radius: 0px;
                z-index: -10;
                background-color: $skin-color;
            }

            //BARRA
            &::before {
                content: "";
                position: absolute;
                height: 20px;
                width: 5px;
                top: -1.5px;
                left: 48px;
                border-radius: 5px;

                background-color: $pantsPrimary-color;
            }


        }
    }

    .rigthLeg {
        position: absolute;
        height: 23px;
        width: 75px;
        top: 37px;
        left: 115px;
        border-radius: 30px;
        background-color: $pantsSecondary-color;
        transform-origin: center left;
        z-index: -20 !important;
        animation: Legcycle 1s linear infinite reverse;
        animation-delay: 0.3s;

        .rigthCalf {
            position: absolute;
            height: 17px;
            width: 75px;
            top: -3px;
            left: 65px;
            border-radius: 30px;
            transform: rotate(115deg);
            background-color: $pantsSecondary-color;
            transform-origin: center left;
            animation: CalfCycle 1s linear infinite reverse;
            animation-delay: 0.3s;

            //SKIN
            &::after {
                content: "";
                position: absolute;
                height: 17px;
                width: 20px;
                top: 0px;
                left: 50px;
                border-radius: 0px;
                z-index: -10;
                background-color: $skinShadow-color;
            }

            //BARRA
            &::before {
                content: "";
                position: absolute;
                height: 20px;
                width: 5px;
                top: -1.5px;
                left: 48px;
                border-radius: 5px;
                background-color: $pantsSecondary-color;
            }
        }
    }

    .foot {
        position: absolute;
        height: 16px;
        width: 40px;
        top: 10px;
        left: 70px;
        border-top-left-radius: 20%;
        border-top-right-radius: 60%;
        border-bottom-left-radius: 30%;
        border-bottom-right-radius: 30%;
        transform: rotate(-115deg);
        background-color: $footPrimary-color;
        transform-origin: center left;
        animation: footCycle 1s linear infinite;

        // PEDAL
        &::after {
            content: "";
            position: absolute;
            height: 8px;
            width: 20px;
            top: 15px;
            left: 10px;
            border-radius: 5px;
            background-color: $tire-color;
        }

        //SOCK
        &::before {
            content: "";
            position: absolute;
            height: 5px;
            width: 18px;
            top: 0px;
            left: 2px;
            border-top-left-radius: 20%;
            border-top-right-radius: -10%;
            border-bottom-left-radius: 200%;
            border-bottom-right-radius: 300%;
            background-color: $sockPrimary-color;
        }
    }

}

//TODO refatorar abaixo
.bike {
    width: 300px;
    height: 200px;
    position: absolute;
    bottom: 8px;
    left: 0%;
    z-index: -10;

    //transform: scale(3);
    //animation: ride 1s linear infinite;

    .bikeFrame {
        position: absolute;

        .tubeTop {
            position: absolute;
            width: 95px;
            height: 6px;
            background-color: $frame-color;
            transform: rotate(-10deg);
            top: 82px;
            left: 115px;

            &::after {
                content: "";
                position: absolute;
                width: 8px;
                height: 6px;
                background-color: $tire-color;
                top: 0px;
                left: 70px;
            }

            &::before {
                content: "";
                position: absolute;
                width: 8px;
                height: 6px;
                background-color: $tire-color;
                top: 0px;
                left: 60px;
            }
        }

        .tubeDown {
            position: absolute;
            width: 104px;
            height: 8px;
            background-color: $frame-color;
            transform: rotate(-40deg);
            top: 116px;
            left: 122px;

            &::after {
                content: "";
                font-size: 8px;
                position: absolute;
                top: -1.5px;
                left: 30px;
                font-weight: 900;
            }

            &::before {
                content: "";
                position: absolute;
                width: 15px;
                height: 8px;
                background-color: $tire-color;

                top: 0px;
                left: 70px;
            }
        }

        .tubeSeat {
            position: absolute;
            width: 6px;
            height: 73px;
            background-color: $frame-color;
            transform: rotate(-15deg);
            top: 85px;
            left: 120px;
        }

        .tubeChainStay {
            position: absolute;
            width: 62px;
            height: 3px;
            background-color: $frame-color;
            transform: rotate(5deg);
            top: 151px;
            left: 69px;
            z-index: 20;
            border-radius: 2px;
        }

        .tubeStay {
            position: absolute;
            width: 75px;
            height: 3px;
            background-color: $frame-color;
            transform: rotate(-50deg);
            top: 120px;
            left: 55px;
            z-index: 20;
            border-radius: 2px;
        }

        .tubeHead {
            position: absolute;
            width: 8px;
            height: 25px;
            background-color: $frame-color;
            transform: rotate(-15deg);
            top: 69px;
            left: 207px;

            &::after {
                content: "";
                position: absolute;
                width: 3px;
                height: 6px;
                border-top-left-radius: 2px;
                border-bottom-left-radius: 4px;
                background-color: $tire-color;
                top: 5px;
                left: 5px;
            }
        }
    }

    .fork {
        position: absolute;
        width: 10px;
        height: 58px;
        transform: rotate(-15deg);
        top: 92px;
        left: 217px;
        z-index: 20;
        border-top: 58px solid $fork-color;
        border-left: 3px solid transparent;
        border-right: 3px solid transparent;
        border-radius: 2px;

        &::after {
            content: "";
            position: absolute;
            width: 6px;
            height: 6px;
            border-radius: 8px;
            background-color: $fork-color;
            top: -4px;
            left: -1px;
        }
    }

    .forkStem {
        position: absolute;
        width: 8px;
        height: 15px;
        transform: rotate(-15deg);
        top: 55px;
        left: 202px;
        z-index: 20;
        background: $fork-color;
        border-radius: 2px;
    }

    .stem {
        background: $fork-color;
        position: absolute;
        transform: rotate(-5deg);
        width: 15px;
        height: 7px;
        top: 55px;
        left: 202px;
        z-index: 0;
        border-radius: 1px;
    }

    .handleBar {
        width: 30px;
        height: 30px;
        position: absolute;
        left: 205px;
        top: 54px;
        border: solid 5px #333;
        border-color: #333 #333 #333 transparent;
        border-radius: 0 150px 120px 100%/120px;
        transform: rotate(-15deg);
    }

    .seatPost {
        position: absolute;
        width: 5px;
        height: 25px;
        background-color: $fork-color;
        transform: rotate(-15deg);
        top: 62px;
        left: 108.3px;
    }

    .seat {
        position: absolute;
        width: 30px;
        height: 9px;
        background-color: $fork-color;
        top: 55px;
        left: 97px;
        transform: rotate(2deg);
        border-radius: 5px;

    }

    .cranckSet {
        position: absolute;
        background: transparent;
        border: 5px solid $fork-color;
        border-radius: 3rem;
        width: 30px;
        height: 30px;
        z-index: 20;
        top: 140px;
        left: 118px;
    }

    .cranckCenter {
        position: absolute;
        background: $fork-color;
        border: 5px solid $fork-color;
        border-radius: 3rem;
        width: 10px;
        height: 10px;
        z-index: 20;
        top: 150px;
        left: 128px;
    }


    .cranckLeft {
        background: $fork-color;
        position: absolute;
        transform-origin: left;
        animation: spin 1s linear infinite;
        width: 25px;
        height: 6px;
        top: 153px;
        left: 133px;
        z-index: 30;
        border-radius: 4px;

        &::after {
            width: 5px;
            height: 25px;
            transform-origin: center;
            top: -10px;
            left: -3.5px;
            background: $fork-color;
            content: "batata";
            font-size: 5px;
            color: transparent;
            position: absolute;
        }
    }

    .casset {
        position: absolute;
        background: $fork-color;
        border: 5px solid $fork-color;
        border-radius: 3rem;
        width: 10px;
        height: 10px;
        z-index: 1;
        top: 144px;
        left: 66px;

    }

    .cranckRight {
        background: $fork-color;
        position: absolute;
        transform-origin: right;
        animation: spin 1s linear infinite;
        width: 25px;
        height: 6px;
        top: 153px;
        left: 108px;
        z-index: -1;
        border-radius: 4px;
    }

    .wheel {
        position: absolute;
        background: transparent;
        border: 5px solid $wheel-color;
        border-radius: 3rem;
        width: 90px;
        height: 90px;
        box-shadow: 0 0 0 6px $tire-color;

        animation: spin 4s linear infinite;

        .spoke {
            width: 80px;
            height: 1px;
            background: $spoke-color;
            position: absolute;
            transform-origin: center;
            top: 50%;

            &:nth-of-type(1) {
                transform: rotate(45deg);
            }

            &:nth-of-type(2) {
                transform: rotate(90deg);
            }

            &:nth-of-type(3) {
                transform: rotate(135deg);
            }

        }
    }

    .wheelFront {
        position: absolute;
        left: 25px;
        bottom: 7px;


    }

    .wheelBack {
        position: absolute;
        right: 25px;
        bottom: 7px;
    }

    .chainTop {
        width: 60px;
        height: 1px;
        background: $fork-color;
        position: absolute;
        transform-origin: center;
        top: 143px;
        left: 70px;
        transform: rotate(-5deg);
        z-index: 5;
    }

    .chainBottom {
        width: 60px;
        height: 1px;
        background: $fork-color;
        position: absolute;
        transform-origin: center;
        top: 160px;
        left: 70px;
        transform: rotate(15deg);
        z-index: 5;
    }

}

@keyframes ride {
    0% {
        transform: scaleY(1);
    }

    25% {
        transform: scaleY(1.02);
    }

    50% {
        transform: scaleY(1);
    }

    75% {
        transform: scaleY(1.02);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes spin {
    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes Legcycle {
    0% {
        transform: rotate(15deg);
    }

    25% {
        transform: rotate(37deg);
    }

    50% {
        transform: rotate(62deg);
    }

    75% {
        transform: rotate(30deg);
    }

    100% {
        transform: rotate(15deg);
    }
}

@keyframes CalfCycle {
    0% {
        transform: rotate(115deg);
    }

    25% {
        transform: rotate(105deg);
    }

    50% {
        transform: rotate(65deg);
    }

    75% {
        transform: rotate(80deg);
    }

    100% {
        transform: rotate(115deg);
    }
}

@keyframes footCycle {
    0% {
        transform: rotate(-115deg);
    }

    25% {
        transform: rotate(-100deg);
    }

    50% {
        transform: rotate(-110deg);
    }

    75% {
        transform: rotate(-100deg);
    }

    100% {
        transform: rotate(-115deg);
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console