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

              
                <!-- Change the width so you can enjoy all of it (: -->
<div class='container'>
  <div class='panel'>
    <div class='outlet first'>
      <div class='eye l'></div>
      <div class='eye r'></div>
      <div class='m'></div>
    </div>
    <div class='outlet second'>
      <div class='eye l'></div>
      <div class='eye r'></div>
      <div class='m'></div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                html, body { height:100%; background:#E95051; }
.container {
  position: relative;
  max-width:100vh;
  max-height:100%;
  margin:0 auto;
  overflow: hidden;
  
}
.container:before {
  content: "";
  display: block;
  margin-top: 100%;
}
.panel { 
  position:absolute; 
  background:white; 
  height:90%; width:60%; 
  top:5%; left:20%;
  border-radius:5%;
  box-shadow:
    inset 20px 0px 10px -7px rgba(0,0,0,0.25),
		inset -20px 0px 10px -7px rgba(0,0,0,0.25),
    0 0 0 3px #C23B39;
}
.outlet { 
  position:absolute;
  height:30%; width:60%;
  left:20%; top:15%;
  border-radius:25%;
  box-shadow: inset 0px 0px 10px 5px rgba(0,0,0,0.25);
  overflow:hidden;
  z-index:1;
}
.second { top:55%; }

.eye {
  position:absolute;
  width:8%; height:25%;
  top:35%;
  background:black;  
}
.eye:before,.eye:after {
  content:'';
  z-index:-1;
  position:absolute;
  background:black;
  border-radius:50%;
  width:100%; height:40%;
  left:0;
}
.eye:before { top:-20%; } 
.eye:after  { top: 80%; }
.l.eye { left:25%; }
.l.eye,.l:before,.l:after { box-shadow:-5px 0 0 0 #727272; }
.r.eye { left:65%; }
.r.eye,.r:before,.r:after { box-shadow: 5px 0 0 0 #727272; }

.m {
  position:absolute;
  height:6%; width:10%;
  background:black;
  top:58%; left:43%;
}
.m:before,.m:after { 
  content:'';
  position:absolute;
  background:black;
  border-radius:50%;
  top:0;
  height:100%; width:55%;
}
.m:before { left:-12.5%; }
.m:after  { left:   70%; }

.first .l.eye { animation:lpong 8.5s ease infinite; }
.first .r.eye { animation:rpong 8.5s ease infinite; }
.first .m { animation:mpong 8.5s linear infinite; }

@keyframes lpong { /* Top left eye */
  20%,26.8% { top:35%; }
  29.2%,32% { top:45%; }
  37.2%,40.8% { top:25%; }
  46%,48.8% { top:55%; }
  54%,56% { top:40%; }
  60%,66% { top:35%; }
  71%,79% { top:60%; }
  83%,91% { top:41%; }
  97% { top:30%; }
}
@keyframes rpong { /* Top right eye */
  20%,22% { top:35%; }
  25.6%,29.6% { top:22%; }
  32%,42% { top:40%; }
  48.4%,54% { top:25%; }
  60%,63% { top:35%; }
  66%,72% { top:48%; }
  76%,79% { top:35%; }
  83%,93% { top:30%; }
}
@keyframes mpong { /* Top mouth */
  20%,24% { transform:scale(1); top:58%; left:43%; } /* Default */
  27.6% { top:35%; left:53%; }
  31.2% { top:45%; left:34%; }
  34.8% { top:54%; left:53%; }
  38.4% { top:30%; left:34%; }
  42% { top:45%; left:53%; }
  45.6% { top:65%; left:34%; }
  49.2% { top:35%; left:53%; }
  52.8% { top:65%; left:34%; }
  56%,64% { top:67%; left:110%; transform:scale(1); }
  
  64.001% { transform:scale(0); top:58%; left:43%; }
  68% { transform:scale(1); top:58%; left:43%; }
  71% { top:68%; left:53%; }
  74% { top:70%; left:34%; }
  77% { top:43%; left:53%; }
  80% { top:48%; left:34%; }
  83% { top:28%; left:53%; }
  87% { top:39%; left:34%; }
  91% { top:25%; left:53%; }
  97% { top:17%; left:-20%; transform:scale(1); }
  97.001% { transform:scale(0); top:58%; left:43%; }
  100% { transform:scale(1); top:58%; left:43%; }
}

.second .l.eye { animation:lowerLE 16s infinite; }
.second .r.eye { animation:lowerRE 16s infinite; }

.second .l.eye:before,.second .l.eye:after { animation:lowerLES 16s infinite; }
.second .r.eye:before,.second .r.eye:after { animation:lowerRES 16s infinite; }

.second .m { animation:lowerM 16s infinite; }
.second .m:before { animation:lowerLM 16s infinite; }
.second .m:after { animation:lowerRM 16s infinite; }

@keyframes lowerLE { /* Lower left eye */
  3%,7% { box-shadow:-5px 0 0 0 #727272; }
  10%,17% { box-shadow: 5px 0 0 0 #727272; }
  20% { box-shadow:-5px 0 0 0 #727272; }
  
  27% { height:25%; }
  29%,35% { height:11%; }
  40% { height:25%; }
  
  60% { height:25%; }
  60.5% { height:5%; }
  61%,65% { height:25%; }
  65.5% { height:5%; }
  66% { height:25%; }
  
  75% { height:25%; }
  77%,85% { height:7%; }
  90% { height:25%; }
}
@keyframes lowerRE { /* Lower right eye */
  3%,7% { box-shadow:-5px 0 0 0 #727272; }
  10%,17% { box-shadow: 5px 0 0 0 #727272; }
  
  27% { height:25%; }
  29%,35% { height:11%; }
  40% { height:25%; }
  
  60% { height:25%; }
  60.5% { height:5%; }
  61%,65% { height:25%; }
  65.5% { height:5%; }
  66% { height:25%; }
  
  75% { height:25%; }
  77%,85% { height:7%; }
  90% { height:25%; }
}
@keyframes lowerLES { /* Lower left eye shadow */
  3%,7% { box-shadow:-5px 0 0 0 #727272; }
  10%,17% { box-shadow: 5px 0 0 0 #727272; }
  20% { box-shadow:-5px 0 0 0 #727272; }  
}
@keyframes lowerRES { /* Lower right eye shadow */
  3%,7% { box-shadow:-5px 0 0 0 #727272; }
  10%,17% { box-shadow: 5px 0 0 0 #727272; }  
}

@keyframes lowerM { /* Lower mouth */  
  27% { height:6%; border-radius:0 0 0 0; }
  30%,35% { height:12%; border-radius:5% 5% 50% 50%; }
  40% { height:6%; border-radius:0 0 0 0; }
  
  75% { width:10%; left:43%; }
  77%,85% { width:5%; left:46%;}
  90% { width:10%; left:43%; }
}
@keyframes lowerLM { /* Lower left mouth */  
  27% { width:55%; left:-12.5%; }
  30%,36% { width:0%; left:25%; } 
  40% { width:55%; left:-12.5%; }
}
@keyframes lowerRM { /* Lower left mouth */  
  27% { width:55%; }
  30%,36% { width:0%; }
  40% { width:55%; }
}



@media (max-width:500px) { /* First media query */
  .l.eye { left:25%; box-shadow:-3px 0 0 0 #727272; }
  .l:before,.l:after { box-shadow:-3px 0 0 0 #727272; }
  .r.eye { left:65%; box-shadow: 3px 0 0 0 #727272; }
  .r:before,.r:after { box-shadow: 3px 0 0 0 #727272; }

  @keyframes lowerLES { /* Lower left eye shadow */
    3%,7% { box-shadow:-3px 0 0 0 #727272; }
    10%,17% { box-shadow: 3px 0 0 0 #727272; }
    20% { box-shadow:-3px 0 0 0 #727272; }
  }  
  @keyframes lowerRES { /* Lower right eye shadow */
    3%,7% { box-shadow:-3px 0 0 0 #727272; }
    10%,17% { box-shadow: 3px 0 0 0 #727272; }
    
  }
  @keyframes lowerLE { /* Lower left eye */
    3%,7% { box-shadow:-3px 0 0 0 #727272; }
    10%,17% { box-shadow: 3px 0 0 0 #727272; }
    20% { box-shadow:-3px 0 0 0 #727272; }
    
    27% { height:25%; }
    29%,35% { height:11%; }
    40% { height:25%; }
    
    60% { height:25%; }
    60.5% { height:5%; }
    61%,65% { height:25%; }
    65.5% { height:5%; }
    66% { height:25%; }
    
    75% { height:25%; }
    77%,85% { height:7%; }
    90% { height:25%; }
  }
  @keyframes lowerRE { /* Lower right eye */
    3%,7% { box-shadow:-3px 0 0 0 #727272; }
    10%,17% { box-shadow: 3px 0 0 0 #727272; }
    
    27% { height:25%; }
    29%,35% { height:11%; }
    40% { height:25%; }
    
    60% { height:25%; }
    60.5% { height:5%; }
    61%,65% { height:25%; }
    65.5% { height:5%; }
    66% { height:25%; }
    
    75% { height:25%; }
    77%,85% { height:7%; }
    90% { height:25%; }
  }
} /* End first media query */
@media (max-width:250px) {
  .panel {
    box-shadow:
      inset 10px 0px 5px -2px rgba(0,0,0,.25),
		  inset -10px 0px 5px -2px rgba(0,0,0,0.25),
      0 0 0 2px #C23B39;
  }
}
@media (max-width:150px) { /* Third media query */
  .l.eye { left:25%; box-shadow:-1px 0 0 0 #727272; }
  .l:before,.l:after { box-shadow:-1px 0 0 0 #727272; }
  .r.eye { left:65%; box-shadow: 1px 0 0 0 #727272; }
  .r:before,.r:after { box-shadow: 1px 0 0 0 #727272; }

  @keyframes lowerLES { /* Lower left eye shadow */
    3%,7% { box-shadow:-1px 0 0 0 #727272; }
    10%,17% { box-shadow: 1px 0 0 0 #727272; }
    20% { box-shadow:-1px 0 0 0 #727272; }
  }  
  @keyframes lowerRES { /* Lower right eye shadow */
    3%,7% { box-shadow:-1px 0 0 0 #727272; }
    10%,17% { box-shadow: 1px 0 0 0 #727272; }
    
  }
  @keyframes lowerLE { /* Lower left eye */
    3%,7% { box-shadow:-1px 0 0 0 #727272; }
    10%,17% { box-shadow: 1px 0 0 0 #727272; }
    20% { box-shadow:-1px 0 0 0 #727272; }
    
    27% { height:25%; }
    29%,35% { height:11%; }
    40% { height:25%; }
    
    60% { height:25%; }
    60.5% { height:5%; }
    61%,65% { height:25%; }
    65.5% { height:5%; }
    66% { height:25%; }
    
    75% { height:25%; }
    77%,85% { height:7%; }
    90% { height:25%; }
  }
  @keyframes lowerRE { /* Lower right eye */
    3%,7% { box-shadow:-1px 0 0 0 #727272; }
    10%,17% { box-shadow: 1px 0 0 0 #727272; }
    
    27% { height:25%; }
    29%,35% { height:11%; }
    40% { height:25%; }
    
    60% { height:25%; }
    60.5% { height:5%; }
    61%,65% { height:25%; }
    65.5% { height:5%; }
    66% { height:25%; }
    
    75% { height:25%; }
    77%,85% { height:7%; }
    90% { height:25%; }
  }
} /* End third media query */
              
            
!

JS

              
                // For more check out zachsaucier.com
              
            
!
999px

Console