css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="container">
  <div class="head">
    <div class="ear left-ear">
      <div class="inner-ear left-inner-ear"></div>
    </div>
    <div class="ear right-ear">
      <div class="inner-ear right-inner-ear"></div>
    </div>
    <div class="mask"></div>
    <div class="eyes left-eye">
      <div class="eyebrows left-eyebrow"></div>
      <div class="pupils left-pupil"></div>
    </div>
    <div class="eyes right-eye">
      <div class="eyebrows right-eyebrow"></div>
      <div class="pupils right-pupil"></div>
    </div>
    <div class="nose">
      <div class="nostrils left-nostril">
      </div>
      <div class="nostrils right-nostril">
      </div>
      <div class="mouth">
        <div class="tongue"></div>
        <div class="teeth"></div>
      </div>
      <div class="knot">
        <div class="tie left-tie"></div>
        <div class="tie right-tie"></div>
        <div class="knot knot-clone"></div>
      </div>
    </div>
  </div>
  <div class="body">
    <div class="cape-behind"></div>
    <div class="arms left-arm">
      <div class="gloves left-glove">
        <div class="comics left-comic">
          <i></i>
        </div>
        <div class="palms left-palm"></div>
        <div class="thumbs left-thumb"></div>
      </div>
    </div>
    <div class="arms right-arm">
      <div class="gloves right-glove">
        <div class="comics right-comic">
          <i></i>
        </div>
        <div class="palms right-palm"></div>
        <div class="thumbs right-thumb"></div>
      </div>
    </div>
    <div class="legs left-leg">
      <div class="toe-nails left-toe-nails"></div>
    </div>
    <div class="legs right-leg">
      <div class="toe-nails right-toe-nails"></div>
    </div>
    <div class="body body-clone"></div>
    <div class="cape-neck"></div>
    <div class="underwear">
      <div class="inner-lining"></div>
      <div class="leg-lining left-lining"></div>
      <div class="leg-lining right-lining"></div>
      <div class="middle"></div>
    </div>
  </div>
  <div class="comic-pile">
    <div class="animated-comics falling-comics1"></div>
    <div class="animated-comics falling-comics2"></div>
    <div class="animated-comics falling-comics3"></div>
    <div class="animated-comics falling-comics4"></div>
    <div class="animated-comics falling-comics5"></div>
    <div class="animated-comics falling-comics6"></div>
  </div>
</div>
<h1>The Comic Book Caper!</h1>
            
          
!
            
              :root {
  --black: #111;
  --light-black: #333;
  --blue: #C7FFED;
  --gray: #CECCCC;
  --dark-gray: #A9A7A7;
  --orange: #F2A359;
  --dark-orange: #C78649;
  --pink: #F991CC;
  --dark-pink: #CC77A7;
  --purple: #81526A;
  --dark-purple: #73495E;
  --shadow: rgba(0, 0, 0, 0.1);
  --white: #FFFAE2;
  --dark-white: #E8E4CE;
  --yellow: #FCE373;
  --dark-yellow: #CFBA5F;
  
  --font: 'Amatic SC', cursive;
}

html, body {
  align-items: center;
  background-color: var(--blue);
/*   background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="6" height="6" viewBox="0 0 4 4"%3E%3Cpath fill="%239C92AC" fill-opacity="0.3" d="M1 3h1v1H1V3zm2-2h1v1H3V1z"%3E%3C/path%3E%3C/svg%3E'); */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

h1 {
  font-family: var(--font);
  font-size: 3rem;
  font-weight: 700;
}

.container {
/*   border: 1px dashed var(--black); */
  display: flex;
  flex-direction: column;
  height: 600px; width: 800px;
  position: relative;
  overflow: hidden;
}

.head {
  background-color: var(--gray);
  border-radius: 50%;
  height: 28%; width: 20%; 
  position: absolute;
  top: 5%; left: 40%;
  z-index: 2;
}

.ear {
  background-color: var(--gray);
  height: 25%; width: 25%;
  position: absolute;
  top: -8%;
  transform-origin: center bottom;
}

.ear.left-ear {
  border-radius: 10px 50px;
  border-left: 3px solid var(--gray);
  left: 15%;
  transform: rotate(-45deg);
}

.ear.right-ear {
  border-radius: 50px 10px;
  border-right: 3px solid var(--gray);
  right: 15%;
  transform: rotate(45deg);
}

.inner-ear {
  background-color: var(--dark-gray);
  height: 50%; width: 25%;
  position: absolute; bottom: 40%;
  transform-origin: center bottom;
}

.inner-ear.left-inner-ear {
  border-radius: 30px 50px 30px 50px;
  left: 2px;
  transform: rotate(-10deg);
}

.inner-ear.right-inner-ear {
  border-radius: 50px 30px 50px 30px;
  right: 2px;
  transform: rotate(10deg);
}

.mask {
  background-color: var(--purple);
  border-radius: 10px;
  box-shadow: 0px -6px 2px -3px var(--shadow),
              0px 4px 2px -1px var(--shadow);
  height: 32%; width: 105%;
  left: -2%; top: 28%;
  position: absolute;
}

.eyes {
  background-color: var(--black);
  border-radius: 50%;
  height: 15%; width: 10%;
  position: absolute;
  top: 37%;
  z-index: 2;
}

.left-eye {
  left: 30%;
}

.right-eye {
  right: 30%;
}

.eyebrows {
  background-color: var(--black);
  height: 25%; width: 150%;
  position: absolute;
}

.left-eyebrow {
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
  left: -20%;
  transform: rotate(15deg);
  transform-origin: right center;
}

.right-eyebrow {
  border-top-left-radius: 50%;
  border-bottom-left-radius: 50%;
  right: -20%;
  transform: rotate(-15deg);
  transform-origin: left center;
}

.nose {
  background-color: var(--dark-gray);
  border-radius: 50%;
  box-shadow: 0px -7px 5px -2px var(--shadow),
              0px 7px 5px -3px var(--shadow);
  height: 65%; width: 120%;
  left: -11%; bottom: -18%;
  position: absolute;
}

.nostrils {
  background-color: var(--black);
  border-radius: 50px;
  box-shadow: inset 0px -7px 1px 0px #444;
  height: 22%; width: 16%;
  position: absolute;
  top: 8px;
}

.left-nostril {
  left: 28%;
  transform: rotate(-15deg);
}

.right-nostril {
  right: 28%;
  transform: rotate(15deg);
}

.mouth {
/*   animation: evilLaugh 1.5s ease-in-out 0s 4; */
  background-color: var(--black);
  border-radius: 30px 30px 50% 50%;
  height: 45%; width: 75%;
  left: 12.5%; bottom: 10%;
  position: absolute;
}

@keyframes evilLaugh {
  0%, 100% { transform:scale(1, 1) }
  50% { transform:scale(0.9, 0.8) }
}

.teeth {
  background-color: var(--white);
  border-radius: 50% 50% 50px 50px;
  box-shadow: inset 0px 5px 3px 0px var(--shadow);
  height: 25%; width: 75%;
  position: absolute;
  top: 0; left: 12.5%;
}

.tongue {
  background-color: var(--dark-pink);
  border-radius: 50%;
  box-shadow: inset 0px 8px 2px -3px var(--shadow);
  height: 50%; width: 85%;
  left: 7.5%; bottom: 8%;
  position: absolute;
}

.body {
  background-color: var(--gray);
  border-radius: 50% 50% 80px 80px;
  height: 48%; width: 32%;
  position: absolute;
  top: 30%; left: 34%;
}

.cape-neck {
  background-color: var(--purple);
  border-radius: 50px;
  box-shadow: 0px 5px 5px 0px var(--shadow);
  height: 15%; width: 75%;
  position: absolute;
  top: 6%; left: 14%;
}

.knot {
  background-color: var(--purple);
  border-radius: 50%;
  height: 25%; width: 15%;
  left: 42.5%; bottom: -20%;
  position: absolute;
}

.knot-clone {
  height: 100%; width: 100%;
  position: absolute;
  top: 0; left: 0;
}

.tie {
  background-color: var(--dark-purple);
  border-radius: 10px 10px 100% 100%;
  height: 125%; width: 60%;
  position: absolute; bottom: -75%;
  transform-origin: center top;
}

.left-tie {
  left: -10%;
  transform: rotate(45deg);
}

.right-tie {
  right: -10%;
  transform: rotate(-45deg);
}

.cape-behind {
  background-color: var(--dark-purple);
  border-radius: 50% 50% 5px 5px;
  border-left: 8px solid var(--purple);
  border-right: 8px solid var(--purple);
  height: 110%; width: 125%;
  position: absolute;
  top: 5%; left: -16%;
}

.body-clone {
  border-radius: 50%;
  box-shadow: 0px 10px 5px 8px var(--shadow);
  height: 100%; width: 100%;
  position: absolute;
  top: 0; left: 0;
}

.arms {
  background-color: var(--gray);
  border-radius: 50% 50% 10px 10px;
  height: 60%; width: 25%;
  position: absolute;
  top: 30%;
  transform-origin: center top;
}

.arms.left-arm {
/*   animation: waveLeftArm.71s ease-in-out 0s 10; */
  left: 15%;
  transform: rotate(115deg);
}

@keyframes waveLeftArm {
  0%, 100% { transform: rotate(115deg) }
  50% { transform: rotate(130deg) }
}

.arms.right-arm {
/*   animation: waveRightArm.71s ease-in-out 0s 10; */
  right: 15%;
  transform: rotate(-115deg);
}

@keyframes waveRightArm {
  0%, 100% { transform: rotate(-115deg) }
  50% { transform: rotate(-140deg) }
}

.gloves {
  background-color: var(--purple);
  border-radius: 2px 2px 50% 50%;
  box-shadow: 0px -3px 2px 0px var(--shadow);
  height: 55%; width: 110%;
  position: absolute; bottom: -27.5%;
}

.gloves.left-glove {
/*   animation: leftGlove .7s ease-in-out .1s 10; */
  left: -5%;
}

@keyframes leftGlove {
  0%, 100% { transform: rotate(1deg) }
  50% { transform: rotate(-1deg) }
}

.gloves.right-glove {
/*   animation: rightGlove .7s ease-in-out .1s 10; */
  right: -5%;
}

@keyframes rightGlove {
  0%, 100% { transform: rotate(-1deg) }
  50% { transform: rotate(1deg) }
}

.comics {
  height: 35%; width: 170%;
  position: absolute; bottom: 5%;
}

.left-comic {
  background-color: var(--yellow);
  border-radius: 2px 2px 5px 5px;
/*   border-left: 2px solid var(--white); */
  border-top: 10px solid var(--white);
  box-shadow: 0px -2px 0px 0px var(--dark-yellow);
  left: -25%;
}

.right-comic {
  background-color: var(--orange);
  border-radius: 10px 10px 2px 2px;
  border-right: 1px solid var(--white);
  border-bottom: 10px solid var(--white);
  box-shadow: 0px 1px 0px 0px var(--dark-orange);
  right: -45%;
}

.comics i {
  border-radius: 5px;
  height: 95%; width: 75%;
  overflow: hidden;
  position: absolute;
}

.left-comic i {
  background-color: var(--dark-yellow);
  bottom: -3%;
  right: 4%;
}

.right-comic i {
  background-color: var(--dark-orange);
  top: -5%;
  left: 4%;
}

.thumbs {
  background-color: var(--dark-purple);
  border-radius: 50px;
  height: 45%; width: 30%;
  position: absolute; bottom: 20%;
}

.thumbs.left-thumb {
  left: -5%;
  transform: rotate(45deg);
  transform-origin: right center;
}

.thumbs.right-thumb {
  right: -5%;
  transform: rotate(-15deg);
  transform-origin: left center;
}

.palms {
  background-color: var(--purple);
  border-radius: 50px;
  height: 50%; width: 105%;
  position: absolute; bottom: -10%;
}

.legs {
  background-color: var(--gray);
  border-radius: 0px 0px 5px 5px;
  height: 65%; width: 35%;
  position: absolute; bottom: -30%;
}

.legs.left-leg {
  box-shadow: inset -5px -1px 5px 0px var(--shadow);
  left: 1%;
}

.legs.right-leg{
  box-shadow: inset 5px -1px 5px 0px var(--shadow);
  right: 1%;
}

.toe-nails {
  background-color: var(--white);
  border-radius: 10px 10px 50% 50%;
  height: 4%; width: 10%;
  position: absolute; bottom: 0;
}

.left-toe-nails {
  box-shadow: 20px 0px 0px 0px var(--white),
              40px 0px 0px 0px var(--white);
  left: 5%;
}

.right-toe-nails {
  box-shadow: -20px 0px 0px 0px var(--white),
              -40px 0px 0px 0px var(--white);
  right: 5%;
}

.underwear {
/*   background-color: var(--white); */
  border-radius: 0px 0px 50% 50%;
  border-top: 20px solid var(--dark-white);
  box-shadow: 0px -2px 5px 0px var(--shadow);
  height: 40%; width: 100%;
  position: absolute; bottom: -1%;
}

.underwear .inner-lining {
  border-top: 4px dashed var(--dark-gray);
  height: 0; width: 100%;
  position: absolute;
  top: -12%;
  z-index: 3;
}

.underwear .middle {
  background-color: var(--dark-white);
  border-radius: 0px;
  height: 110%; width: 10%;
  position: absolute;
  top: -10%; left: 45.5%;
}

.underwear .leg-lining {
  background-color: var(--white);
  border-bottom: 3px solid var(--shadow);
  height: 100%; width: 46%;
  position: absolute; bottom: 0;
}

.underwear .leg-lining.left-lining {
  border-radius: 0 0 0 90%;
  left: 0;
}

.underwear .leg-lining.right-lining {
  border-radius: 0 0 90% 0;
  right: 0;
}

.comic-pile {
  
}

.comic-pile .animated-comics {
  border-radius: 2px;
  box-shadow: 3px 1px 0px 0px var(--dark-white);
  height: 16.5%; width: 10%;
  position: absolute;
  will-change: transform;
  z-index: 3;
}

.comic-pile .animated-comics:before,
.comic-pile .animated-comics:after {
  content: '';
  position: absolute;
}

.comic-pile .animated-comics:before {
  height: 65%; width: 90%;
  left: 5%; bottom: 2%;
}

.comic-pile .animated-comics:after {
  height: 20%; width: 23%;
  left: 10%;
  top: 5%;
}

.comic-pile .animated-comics.falling-comics1 {
/*   animation: fallingComic1 3s ease-in-out forwards; */
  background-color: var(--pink);
  right: 65%;
  top: -20%;
}

.comic-pile .falling-comics1:before,
.comic-pile .falling-comics1:after {
/*   animation: flatten1 2.8s ease-in-out forwards; */
  background-color: var(--dark-pink);
}

.comic-pile .animated-comics.falling-comics2 {
/*   animation: fallingComic2 2s ease-in-out 2 2s; */
  background-color: var(--white);
  right: 10%;
  top: -18%;
}

.comic-pile .falling-comics2:before, 
.comic-pile .falling-comics2:after {
/*   animation: flatten 2.8s ease-in-out forwards 2s; */
  background-color: var(--dark-white);
}

.comic-pile .animated-comics.falling-comics3 {
/*   animation: fallingComic3 1.7s ease-in-out forwards 3s; */
  background-color: var(--light-black);
  right: 55%;
  top: -20%;
}

.comic-pile .falling-comics3:before,
.comic-pile .falling-comics3:after {
/*   animation: flatten1 2.8s ease-in-out forwards; */
  background-color: var(--black);
}

.comic-pile .animated-comics.falling-comics4 {
/*   animation: fallingComic2 1.5s ease-in-out 2 4s; */
  background-color: var(--gray);
  left: 7%;
  top: -18%;
}

.comic-pile .falling-comics4:before, 
.comic-pile .falling-comics4:after {
/*   animation: flatten 2.8s ease-in-out forwards 2s; */
  background-color: var(--dark-white);
}

.comic-pile .animated-comics.falling-comics5 {
/*   animation: fallingComic5 3s ease-in-out forwards 5s; */
  background-color: var(--yellow);
  left: 65%;
  top: -20%;
}

.comic-pile .falling-comics5:before,
.comic-pile .falling-comics5:after {
/*   animation: flatten1 2.5s ease-in-out forwards; */
  background-color: var(--dark-yellow);
}

.comic-pile .animated-comics.falling-comics6 {
/*   animation: fallingComic2 1.7s ease-in-out 1 6s; */
  background-color: var(--orange);
  right: 55%;
  top: -20%;
}

.comic-pile .falling-comics6:before,
.comic-pile .falling-comics6:after {
/*   animation: flatten1 2.8s ease-in-out forwards; */
  background-color: var(--dark-orange);
}

@keyframes fallingComic1 {
  0%,2% { transform: rotate(0deg) translatey(0%) scale(1, 1) }
  25%,27% { transform: rotate(45deg) translatey(200%) scale(.8, 1) }
  55%,58% { transform: rotate(-45deg) translatey(600%) scale(.05, 1) }
  100% { transform: rotate(40deg) translatey(950%) scale(1, 1) }
}

@keyframes fallingComic2 {
  0%,2% { transform: rotate(0deg) translatey(0%) scale(1, 1) }
  98%,100% { transform: rotate(5deg) translatey(900%) scale(.8, 1) }
}

@keyframes fallingComic3 {
  0%,2% { transform: rotate(0deg) translatey(0%) scale(1, 1) }
  50% { transform: rotate(-45deg) translatey(400%) scale(.8, 1) }
  100% { transform: rotate(2deg) translatey(900%) scale(1, 1) }
}

@keyframes fallingComic5 {
  0%,2% { transform: rotate(0deg) translatey(0%) scale(1, 1) }
  25%,27% { transform: rotate(-45deg) translatey(200%) scale(.8, 1) }
  55%,58% { transform: rotate(45deg) translatey(600%) scale(.5, 1) }
  100% { transform: rotate(-45deg) translatey(950%) scale(1, 1) }
}

@keyframes flatten1 {
  0%,2% { transform: scale(1,1) }
  25%,27% { transform: scale(1,1) }
  55%,58% { transform: scale(0,1) }
  100% { transform: scale(1,1) }
}

@media (max-width: 800px) {
  h1 {
    font-size: 2rem;
  }
  .container {
    height: 300px; width: 400px;
    top: 20px;
  }
  .underwear .inner-lining {
  border-top: 2px dashed var(--dark-gray);
  top: -20%;
}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console