Pen Settings

HTML

CSS

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.

+ 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

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.

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

              
                <main>
  <div class="tail"></div>
  <div class="body"></div>
  <div class="head"></div>
  <div class="ear1"></div>
  <div class="ear2"></div>
  <div class="hand"></div>
  <div class="leg1"></div>
  <div class="leg2"></div>
  <div class="leave1"></div>
  <div class="leave2"></div>
  <div class="leave3"></div>
  <div class="leave4"></div>
  <div class="ketchup1"></div>
  <div class="ketchup2"></div>
  <div class="ketchup3"></div>
</main>
<a id="credit" href="https://dribbble.com/shots/14147543-Pikachu" target="_blank">Design by Carlos Puentes</a>

<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">

<a id="github-corner" href="https://github.com/MichalPorag/Pikachu-Pure-CSS" target="_blank">
  <svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 250 250" fill="#151513" style="position: absolute; top: 0; left: 0">
    <path fill="#2C2A24" d="M250 0L135 115h-15l-12 27L0 250V0z"/>
    <path fill="#9ccead" class="octo-arm" d="M122 109c15-9 9-19 9-19-3-7-2-11-2-11 1-7-3-2-3-2-4 5-2 11-2 11 3 10-5 15-9 16" style="-webkit-transform-origin: 120px 144px; transform-origin: 120px 144px"/>
    <path fill="#9ccead" class="octo-body" d="M135 115s-4 2-5 0l-14-14c-3-2-6-3-8-3 8-11 15-24-2-41-5-5-10-7-16-7-1-2-3-7-12-11 0 0-5 3-7 16-4 2-8 5-12 9s-7 8-9 12c-14 4-17 9-17 9 4 8 9 11 11 11 0 6 2 11 7 16 16 16 30 10 41 2 0 3 1 7 5 11l12 11c1 2-1 6-1 6z"/>
  </svg>
</a>

<script async defer src="https://buttons.github.io/buttons.js"></script>
              
            
!

CSS

              
                :root {
  --yellow: #FFEB91;
  --shade-yellow: #EAB446;
  --red: #E15050;
  --red-cheek: #E25150;
  --black: #2C2A24;
  --green: #9ccead;
  --green-leave-1: #2EB492;
  --green-leave-2: #A1CE55;
  --yellow-2: #F4EFC4;
  --orange: #E8A04D;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  z-index: 2;
  background-repeat: no-repeat;
}

body {
  height: 100vh;
  background-color: #9ccead;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

main {
 --size: 52.5vmin;
  
  width: calc(var(--size) - 0.7%);
  height: var(--size);
  border-radius: 50%;
  background-color: var(--green);
  background-image: 
    radial-gradient(ellipse, var(--orange) 40%, transparent 40.2%),
    linear-gradient(var(--green) 40%, transparent 40.2%),
    radial-gradient(ellipse, 
      var(--black) 65%,
      var(--black) 65.2%);
  background-position: 
    16% 7%,
    100% 0%,
    0% 0%;
  background-size: 
    20% 30%,
    70% 100%,
    100% 100%;
}

main > * {
  border: 1.5vmin solid var(--black);
  position: relative;
}

.tail {
  width: 41%;
  height: 50%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22% 100%);
  background-image: 
    linear-gradient(var(--black) 60%, transparent 60.2%),
    linear-gradient(var(--black) 60%, transparent 60.2%),
    radial-gradient(ellipse, var(--black) 60%, transparent 60.2%),
    radial-gradient(ellipse,
      transparent 20%, 
      var(--black) 20.2%, 
      var(--black) 23.8%,
      transparent 24%),
    radial-gradient(ellipse,
      transparent 61.5%, 
      var(--black) 61.7%, 
      var(--black) 65.8%,
      transparent 66%),
    linear-gradient(transparent 60%, var(--green) 60.2%),
    radial-gradient(ellipse,
      transparent 20%, 
      var(--shade-yellow) 20.2%),
    radial-gradient(ellipse, 
      transparent 18%, 
      var(--yellow) 18.2%, 
      var(--yellow) 65.8%,
      transparent 66%),
    radial-gradient(ellipse, 
      var(--yellow) 65.8%,
      transparent 66%);
  background-position: 
    55% 83%,
    30% 79%,
    53.5% 79%,
    62.5% -6%,
    80% 10%,
    25% 100%,
    50% 58%,
    60% -8%,
    -50% 0%;
  background-size: 
    7% 10%,
    34% 9%,
    12% 10%,
    350% 200%,
    350% 200%,
    40% 70%,
    350% 400%,
    250% 180%,
    70% 40%;
  border-radius: 5%;
  top: 10%;
  left: -11%;
  z-index: 2;
  border: 0;
}

.tail::after {
  width: 8%;
  height: 78%;
  position: absolute;
  left: 1.6vmin;
  overflow: hidden;
  background-color: var(--black);
  content: "";
  transform: rotate(-10deg);
  border-radius: 2vmin;
}

.body {
  width: 62%;
  height: 67%;
  background-color: var(--yellow);
  top: calc(-50% + 32.7%);
  left: 16%;
  border-radius: 50%;
  z-index: 3;
  background-image: 
    conic-gradient(ellipse, var(--red) 60%, transparent 60.2%);
  background-position: 
    0% 50%;
  background-size: 
    20% 10%;
}

.head {
  width: 63%;
  height: 55%;
  background-color: var(--yellow);
  top: calc(-150% + 33.5%);
  left: 18%;
  border-radius: 110% 110% 100% 85% / 125% 125% 100% 80%;
  z-index: 4;
}

.head {
    background-image: 
    /*cheeks*/
    radial-gradient(ellipse, var(--red-cheek) 40%, transparent 41%),
    radial-gradient(ellipse, var(--red-cheek) 40%, transparent 41%),
    /*shadow*/
    radial-gradient(ellipse, transparent 40%, var(--shade-yellow) 40.2%),
    /*eyes*/
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    /*nose*/
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
      radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    /*mouth*/
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%);
  background-position: 
    /*cheeks*/
    -35% 95%,
    105% 115%,
    /*shadow*/
    45% 65%,
    /*eyes*/
/*         76% 73%, */
    76% 80%,
    17% 50%,
/*     73% 65%, */
    65% 51%,
    /*nose*/
    41% 62%,
    41.5% 63%,
    /*mouth*/
    42% 62%,
    35% 67%,
    47% 67%,
    45% 70%,
    35% 70%;
  background-size: 
    /*cheeks*/
    45% 55%,
    45% 55%,
    /*shadow*/
    300% 230%,
    /*eyes*/
    26% 33%,
    20% 30%,
/*     23% 30%, */
    20% 30%,
    /*nose*/
    10% 7%,
    5% 3%,
    /*mouth*/
    20% 25%,
    18% 20%,
    20% 20%,
    25% 25%,
    20% 20%;
}

.ear1 {
  width: 50%;
  height: 18%;
  background-image: radial-gradient(ellipse, var(--yellow) 40%, var(--black) 40.2%);
  background-position: 0 65%;
  background-size: 130% 430%;
  top: calc(-150% + -35%);
  left: -4%;
  transform: rotate(50deg);
  border-radius: 0% 100% 12% 100% / 0% 100% 0% 100%;
  z-index: 2;
}

.ear2 {
  width: 50%;
  height: 19%;
  background-image: radial-gradient(ellipse, var(--yellow) 40%, var(--black) 40.2%);
  background-position: 20% 40%;
  background-size: 180% 430%;
  top: calc(-150% + -47.5%);
  left: 68%;
  border-radius: 80% 20% 100% 0% / 100% 0% 50% 0%;
  transform: rotate(140deg);
  border-right: 0;
  z-index: 4;
}

.ear2::after {
  content: "";
  position: absolute;
  width: 9%;
  height: 50%;
  top: 0%;
  left: 95%;
  background-color: var(--yellow);
}

.hand {
  width: 24%;
  height: 38%;
  top: calc(-250% + 77%);
  left: 35%;
  transform: rotate(65deg);
  border-radius: 45% 35% 20% 20% / 100% 80% 20% 20%;
  border-bottom: 0;
  border: 0;
  z-index: 5;
  background-image: 
    radial-gradient(var(--black) 52%, transparent 52.2%),
    radial-gradient(var(--black) 52%, transparent 52.2%),
    radial-gradient(transparent 40%, var(--shade-yellow) 40.5%, var(--shade-yellow) 52%, transparent 52.5%),
    radial-gradient(var(--yellow) 40.5%, var(--yellow) 52%, var(--black) 52.2%, var(--black) 62%, transparent 62.5%);
  background-position: 
    35% -3%,
    55% -3%,
    60% 63%,
    60% 30%;
  background-size: 
    20% 13%,
    24% 13%,
    220% 280%,
    100% 170%;
}

.leg1 {
  width: 35%;
  height: 32%;
  top: calc(-250% + 68%);
  left: 35%;
  transform: rotate(65deg);
  border-radius: 50% 50% 30% 50% / 50% 50% 50% 30%;
  z-index: 5;
  border: 0;
  background-image: 
    radial-gradient(transparent 50%, var(--black) 50.5%, var(--black) 60.5%, transparent 60.7%),
    radial-gradient(var(--yellow) 40%, var(--shade-yellow) 40.5%, var(--shade-yellow) 52%, transparent 52.5%);
  background-position: 
    66% 20%,
    83% 35%;
  background-size: 
    120% 150%,
    240% 250%;
}

.leg2 {
  width: 11%;
  height: 26%;
  top: calc(-300% + 86%);
  left: 57%;
  transform: rotate(-6deg);
  border-radius: 64% 36% 46% 54% / 52% 24% 76% 48%;
  z-index: 5;
  border-width: 0.8vmin;
  background-image: 
    radial-gradient(var(--shade-yellow) 50%, transparent 50.5%),
    radial-gradient(var(--yellow) 50%, transparent 50.5%),
    radial-gradient(var(--yellow) 50%, transparent 50.5%),
    radial-gradient(var(--shade-yellow)49.8%, var(--black) 50%, var(--black) 60%, transparent 60.5%),
    radial-gradient(var(--yellow) 57%, transparent 25.5%),
    radial-gradient(var(--black) 57%, transparent 25.5%),
    radial-gradient(var(--yellow) 57%, transparent 25.5%),
    radial-gradient(var(--shade-yellow) 57%, transparent 25.5%),
    radial-gradient(var(--shade-yellow) 70%, transparent 70.2%);
  background-position: 
    70% 105%,
    250% 60%,
    -40% 15%,
    -10% 10%,
    -250% 10%,
    -150% 2%,
    -140% -10%,
    -20% 20%,
    70% -30%;
  background-size: 
    100% 30%,
    93% 70%,
    140% 80%,
    150% 150%,
    95% 25%,
    95% 25%,
    95% 25%,
    30% 30%,
    100% 100%;
}

.leg2:after {
  width: 45%;
  height: 30%;
  position: absolute;
  top: 9.2vmin;
  overflow: hidden;
  background-color: var(--shade-yellow);
  content: "";
  transform: rotate(-90deg);
}

.leave1 {
  width: 11vmin;
  height: 20vmin;
  background-color: var(--green-leave-1);
  position: relative;
  top: -257.5%;
  z-index: 10;
  transform: rotate(-7deg);
  border-radius: 0% 100% 0% 100% / 0% 58% 41% 100%;
  border: 1.5vmin solid var(--black);
}

.leave2 {
  width: 10vmin;
  height: 10vmin;
  background-color: var(--green-leave-2);
  position: relative;
  top: -270%; 
  left: 17%;
  z-index: 11;
  transform: rotate(30deg);
  border-radius: 0% 100% 78% 65% / 0% 85% 74% 100%;
  border: 1.5vmin solid var(--black);
}

.leave3 {
  width: 13vmin;
  height: 15vmin;
  background-color: var(--green-leave-1);
  position: relative;
  top: -320%;
  left: 75%;
  z-index: 11;
  transform: rotate(-158deg);
  border-radius: 0% 100% 78% 65% / 0% 85% 74% 100%;
  border: 1.5vmin solid var(--black);
}

.leave4 {
  width: 12vmin;
  height: 12vmin;
  background-color: var(--green-leave-2);
  position: relative;
  top: -360%; 
  left: 76.1%;
  z-index: 3;
  transform: rotate(80deg);
  border-radius: 0% 100% 78% 65% / 0% 85% 74% 100%;
  border: 1.5vmin solid var(--black);
}

.ketchup1 {
  width: 33%;
  height: 55%;
  border: 0;
  top: -377%;
  left: 57%;
  transform: rotate(3deg);
  border-top: 0;
  z-index: 4;
  background-image: 
    radial-gradient(ellipse, transparent 40%, var(--black) 40.2%, var(--black) 60%, transparent 60.2%),
    radial-gradient(ellipse, var(--red) 60%, var(--black) 60.2%, var(--black) 69.8%, transparent 70%);
  background-position: 
    -40% -23%,
    10% 100%;
  background-size: 
    55% 40%,
    100% 85%;
}

.ketchup1::after {
  width: 86%;
  height: 40%;
  content: "";
  position: absolute;
  border: 0;
  top: 42%;
  left: 6%;
  border-top: 0;
  z-index: 6;
  background-image: 
    radial-gradient(ellipse, var(--yellow-2) 60%, var(--black) 60.2%, var(--black) 68%,transparent 68.2%);
  background-position: 
    50% 80%;
  background-size: 
    150% 100%; 
  background-repeat: no-repeat;
  border-radius: 35%;
}

.ketchup2 {
  width: 15%;
  height: 15%;
  background-color: var(--red);
  top: calc(-500% + 70%);
  left: 65%;
  transform: rotate(45deg);
  border-radius: 23% 100% 0% 45% / 0% 61% 0% 100%;
  border-bottom: 0;
  border-right: 0;
  z-index: 4;
}

.ketchup3 {
  width: 11%;
  height: 13%;
  background-color: var(--red);
  top: calc(-500% + 46%);
  left: 67%;
  border-radius: 20% 20% 0% 0% / 100% 100% 0% 0%;
  border-bottom: 0;
  z-index: 4;
}

.ketchup3::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 50%;
  background-color: white;
  top: -50%;
  left: -57%;
  border-radius: 10% 10% 0% 0% / 100% 100% 0% 0%;
  z-index: 6;
  border: 1.5vmin solid var(--black);
  border-bottom: 1vmin solid var(--black);
}

.ketchup3::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 50%;
  background-color: white;
  top: -110%;
  left: -180%;
  border-radius: 0% 80% 0% 100% / 20% 100% 0% 100% ;
  z-index: 6;
  border: 1vmin solid var(--black);
}
 
main:hover > .head{
  animation: eye-hover-animation 50ms forwards;
}

main:hover > .ear1{
  animation: ear1-hover-animation 100ms forwards;
}

main:hover > .ear2{
  animation: ear2-hover-animation 100ms forwards;
}

@keyframes eye-hover-animation {
  to {
    background-position: 
      /*cheeks*/
      -35% 95%,
      105% 115%,
      /*shadow*/
      45% 65%,
      /*eyes*/
      76% 73%,
/*       76% 80%, */
      17% 50%,
      73% 65%,
/*       65% 51%, */
      /*nose*/
      41% 62%,
      41.5% 63%,
      /*mouth*/
      42% 62%,
      35% 67%,
      47% 67%,
      45% 70%,
      35% 70%;
    background-size: 
      /*cheeks*/
      45% 55%,
      45% 55%,
      /*shadow*/
      300% 230%,
      /*eyes*/
      26% 33%,
      20% 30%,
      23% 30%,
/*       20% 30%, */
      /*nose*/
      10% 7%,
      5% 3%,
      /*mouth*/
      20% 25%,
      18% 20%,
      20% 20%,
      25% 25%,
      20% 20%;
    border-radius: 110% 115% 100% 85% / 125% 125% 100% 80%;
  }
}

@keyframes ear1-hover-animation {
  to {
    transform: translateX(30%) translateY(-33%) rotate(90deg);
  }
}

@keyframes ear2-hover-animation {
  to {
    transform: translateX(-60%) translateY(-64%) rotate(90deg);
  }
}

main > .head{
  animation: eye-animation 300ms forwards;
}

main > .ear1{
  animation: ear1-animation 300ms forwards;
}

main > .ear2{
  animation: ear2-animation 300ms forwards;
}

@keyframes eye-animation {
  from {
    background-position: 
      /*cheeks*/
      -35% 95%,
      105% 115%,
      /*shadow*/
      45% 65%,
      /*eyes*/
      76% 73%,
/*       76% 80%, */
      17% 50%,
      73% 65%,
/*       65% 51%, */
      /*nose*/
      41% 62%,
      41.5% 63%,
      /*mouth*/
      42% 62%,
      35% 67%,
      47% 67%,
      45% 70%,
      35% 70%;
    background-size: 
      /*cheeks*/
      45% 55%,
      45% 55%,
      /*shadow*/
      300% 230%,
      /*eyes*/
      26% 33%,
      20% 30%,
      23% 30%,
/*       20% 30%, */
      /*nose*/
      10% 7%,
      5% 3%,
      /*mouth*/
      20% 25%,
      18% 20%,
      20% 20%,
      25% 25%,
      20% 20%;
    border-radius: 110% 115% 100% 85% / 125% 125% 100% 80%;
  }
  to {
    background-image: 
    /*cheeks*/
    radial-gradient(ellipse, var(--red-cheek) 40%, transparent 41%),
    radial-gradient(ellipse, var(--red-cheek) 40%, transparent 41%),
    /*shadow*/
    radial-gradient(ellipse, transparent 40%, var(--shade-yellow) 40.2%),
    /*eyes*/
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    /*nose*/
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
      radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    /*mouth*/
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--yellow) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%),
    radial-gradient(ellipse, var(--black) 40%, transparent 41%);
  background-position: 
    /*cheeks*/
    -35% 95%,
    105% 115%,
    /*shadow*/
    45% 65%,
    /*eyes*/
/*         76% 73%, */
    76% 80%,
    17% 50%,
/*     73% 65%, */
    65% 51%,
    /*nose*/
    41% 62%,
    41.5% 63%,
    /*mouth*/
    42% 62%,
    35% 67%,
    47% 67%,
    45% 70%,
    35% 70%;
  background-size: 
    /*cheeks*/
    45% 55%,
    45% 55%,
    /*shadow*/
    300% 230%,
    /*eyes*/
    26% 33%,
    20% 30%,
/*     23% 30%, */
    20% 30%,
    /*nose*/
    10% 7%,
    5% 3%,
    /*mouth*/
    20% 25%,
    18% 20%,
    20% 20%,
    25% 25%,
    20% 20%;
  }
}

@keyframes ear1-animation {
  from {
    transform: translateX(30%) translateY(-33%) rotate(90deg);
  }
  to {
    transform: translateX(0%) translateY(0%) rotate(50deg);
  }
}

@keyframes ear2-animation {
  from {
    transform: translateX(-60%) translateY(-64%) rotate(90deg);
  }
  to {
    transform: translateX(-15%) translateY(-20%) rotate(140deg);
  }
}

#credit {
  font-size: max(2vmin, 2rem);
  margin-top: 2vmin;
  text-decoration: none;
  font-family: 'Permanent Marker', cursive;
  background-color: var(--green-leave-1);
  background-image: linear-gradient(-45deg, transparent 40%, var(--yellow) 40%, var(--yellow) 50%, transparent 50%);
  background-size: 30px 100%;
  background-position: -20% -20%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: scale-down 0.1s linear alternate forwards; 
}

#credit:hover {
 animation: scale-up 0.3s linear alternate forwards; 
}

@keyframes scale-up {    
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(1.2);
  }
  40% {
    background-position: -20% -20%;
    transform: scale(1.2);
  }
  70% {
    background-position: 120% 120%;
    transform: scale(1.2);
  }
  100% {
    background-position: -20% -20%;    
    transform: scale(1.2);
  }
}

@keyframes scale-down { 
  from {
    transform: scale(1.2);
  }
  to {
    transform: scale(1);  
  }
}

#github-corner:hover .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
}

@keyframes octocat-wave {
    0% {
        transform: rotate(0deg);
    }

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

    40% {
        transform: rotate(10deg);
    }

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

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

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

@media (max-width: 500px) {
    .github-corner:hover .octo-arm {
        animation: none;
    }

    .github-corner .octo-arm {
        animation: octocat-wave 560ms ease-in-out;
    }
}

              
            
!

JS

              
                /*
    Hi, I'm Michal, a front-end developer at Outbrain 😎
    
    And I LOVE CSS and drawing, feel free to check my lecture on "How to draw, with CSS" in Outbrain guild (13.01.21): 
    https://www.youtube.com/watch?v=dk_xGUqMDMY&list=PLH7Km7lJwMqSviBIID2XUT2BBE_ZTpDWy&index=4&t=1s
    
    
    to more platforms: 
    github: https://github.com/MichalPorag
    medium: https://medium.com/@miporagi
    linkedin: https://www.linkedin.com/in/michal-porag-9522b5142/
    twitter: https://twitter.com/MichalPorag
    my tech talks: https://www.youtube.com/playlist?list=PLH7Km7lJwMqSviBIID2XUT2BBE_ZTpDWy
    
    Feel free to give a star at github 😘: https://github.com/MichalPorag/Pure-CSS-sport-car
*/


              
            
!
999px

Console