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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <h1>Daily CSS Images :: Day 21<br>Superman</h1>

<div class="superman">
  <div class="head">
    <div class="hair"></div>
    <div class="face"></div>
    <div class="ear left"></div>
    <div class="ear right"></div>
    <div class="eye left"></div>
    <div class="eye right"></div>
    <div class="nose"></div>
    <div class="mouth"></div>
  </div>
  <div class="cape"></div>
  <div class="torso">
    <div class="cape-tying"></div>
    <div class="logo">
      <span class="outer"></span>
      <span class="inner"></span>
      <span class="s">s</span>
    </div>
  </div>
  <div class="upperarm"></div>
  <div class="forearm"></div>
  <div class="hand"></div>
  <div class="legs"></div>
  <div class="boots"></div>
</div>
            
          
!
            
              body {
  background: #7cc;
}

h1 {
  color: white;
  font-family: 'Arima Madurai';
  text-align: center;
}

::before,
::after {
  content: "";
  position: absolute;
}

.superman {
  position: relative;
  margin: 0 auto;
  width: 640px;
  height: 480px;
}

.head {
  margin: 0 auto;
  margin-top: 50px;
  position: absolute;
  left: calc((100% - 12.5%) / 2);
  width: 12.5%;
  height: 20%;
  z-index: 5;
}

.hair {
  position: absolute;
  top: -15%;
  left: calc((100% - 106%) / 2);
  width: 106%;
  height: 60%;
  background: #000;
  border-radius: 50% 50% 0 0;
  z-index: 1;
}

.face {
  position: absolute;
  position: relative;
  width: 100%;
  height: 100%;
  background: #f8d0b6;
  border-radius: 100px / 70px 70px 130px 130px;
  z-index: 2;
}

.face::before {
  top: 0;
  left: calc((100% - 106%) / 2);
  width: 106%;
  height: 40%;
  background: #000;
  border-radius: 50%;
  z-index: 2;
}

.ear {
  position: absolute;
  top: 44%;
  width: 18%;
  height: 25%;
  background: #f8d0b6;
  z-index: 3;
}

.ear.left {
  left: -10%;
  border-radius: 50% 25% 45% 70%;
}

.ear.right {
  right: -10%;
  border-radius: 25% 50% 70% 45%;
}

.ear::before {
  top: 25%;
  width: 40%;
  height: 40%;
  background: #dfbba3;
  border-radius: 49%;
}

.ear.left::before {
  left: 20%;
}

.ear.right::before {
  right: 20%;
}

.eye {
  position: absolute;
  top: 56%;
  width: 9%;
  height: 7.5%;
  background: #333;
  border-radius: 50%;
  z-index: 3;
}

.eye.left {
  left: 25%;
}

.eye.right {
  right: 25%;
}

.eye::before {
  left: -30%;
  top: -65%;
  width: 170%;
  height: 25%;
  background: #333;
  border-radius: 2px;
}

.eye.left::before {
  -webkit-transform: rotate(20deg);
  transform: rotate(20deg);
}

.eye.right::before {
  -webkit-transform: rotate(-20deg);
  transform: rotate(-20deg);
}

.nose {
  position: absolute;
  left: calc((100% - 3%)/2);
  top: 60%;
  width: 3%;
  height: 12%;
  background: #666;
  border-radius: 2px;
  z-index: 3;
}

.mouth {
  position: absolute;
  left: calc((100% - 26%)/2);
  top: 80%;
  width: 26%;
  height: 4%;
  background: #555;
  border-radius: 2px;
  z-index: 3;
}

.cape {
  position: absolute;
  left: calc((100% - 26% - 160px)/2);
  top: -23%;
  width: 26%;
  height: 0;
  border-top: 200px solid red;
  border-right: 80px solid transparent;
  border-left: 80px solid transparent;
  transform-origin: center bottom;
  transform: rotatex(170deg);
  z-index: 2;
}

.cape-tying {
  position: absolute;
  top: -10%;
  left: calc((100% - 72%)/2);
  width: 70%;
  height: 45%;
  background: radial-gradient(circle, rgb(56,84,164) 0%, rgba(56, 84, 164, 1) 55%, red 56%, red 90%);
  border-radius: 0 0 50% 50%;
  z-index: 4;
}

.torso {
  position: absolute;
  top: 20%;
  left: calc((100% - 25%)/2);
  width: 25%;
  height: 30%;
  background: #3854a4;
  border: 2px solid;
  border-color: transparent #000 transparent #000;
  border-radius: 30% 30% 45% 45%;
  z-index: 3;
}

.torso::before,
.torso::after {
  top: -10%;
  width: 55%;
  height: 60%;
  background: #3854a4;
  border: 2px solid;
  border-radius: 45%;
  z-index: 3;
}

.torso::before {
  left: -15%;
  border-color: #000 transparent transparent #000;
}

.torso::after {
  right: -15%;
  border-color: #000 #000 transparent transparent;
}

.logo {
  position: absolute;
  left: calc((100% - 100px)/2);
  top: 40%;
}

.logo .outer {
  position: absolute;
  width: 50px;
  height: 0;
  border-right: 25px solid transparent;
  border-bottom: 25px solid red;
  border-left: 25px solid transparent;
  z-index: 5;
}

.logo .outer::before {
  top: 25px;
  left: -25px;
  width: 0;
  height: 0;
  border-top: 70px solid red;
  border-right: 50px solid transparent;
  border-left: 50px solid transparent;
}

.logo .inner {
  position: absolute;
  left: 10px;
  top: 5px;
  width: 40px;
  height: 0;
  border-right: 20px solid transparent;
  border-bottom: 20px solid yellow;
  border-left: 20px solid transparent;
  z-index: 5;
}

.logo .inner::before {
  top: 20px;
  left: -20px;
  width: 0;
  height: 0;
  border-top: 60px solid yellow;
  border-right: 40px solid transparent;
  border-left: 40px solid transparent;
}

.s {
  position: absolute;
  left: .20em;
  top: -.53em;
  font-size: 7.7em;
  font-weight: bold;
  font-variant: small-caps;
  font-family: 'Abril Fatface';
  color: red;
  z-index: 5;
}

.upperarm {
  position: absolute;
  left: calc((100% - 12.5% + 4px)/2);
  top: 20%;
  width: 12.5%;
  height: 16%;
}

.forearm {
  position: absolute;
  left: calc((100% - 10% + 4px)/2);
  top: 30%;
  width: 10%;
  height: 17%;
}

.upperarm::before,
.upperarm::after,
.forearm::before,
.forearm::after {
  width: 100%;
  height: 100%;
  background: #3854a4;
  border: 2px solid;
  z-index: 4;
}

.upperarm::before {
  left: -130%;
  border-color: #000 transparent transparent #000;
  border-radius: 50% 45% 50% 50%;
  -webkit-transform: rotate(-20deg);
  transform: rotate(-20deg);
}

.upperarm::after {
  right: -130%;
  border-color: #000 #000 transparent transparent;
  border-radius: 45% 50% 50% 50%;
  -webkit-transform: rotate(20deg);
  transform: rotate(20deg);
}

.forearm::before {
  left: -185%;
  border-color: transparent #000 #000 #000;
  border-radius: 50% 45% 50% 50%;
}

.forearm::after {
  right: -185%;
  border-color: transparent #000 #000 #000;
  border-radius: 45% 50% 50% 50%;
}

.hand {
  position: absolute;
  left: calc((100% - 9%)/2);
  top: 44%;
  width: 9%;
  height: 8%;
}

.hand::before,
.hand::after {
  width: 100%;
  height: 100%;
  background: #f8d0b6;
  border-radius: 20px;
  z-index: 5;
}

.hand::before {
  left: -200%;
}

.hand::after {
  right: -205%;
}

.legs {
  position: absolute;
  top: 40%;
  left: calc((100% - 14%)/2);
  width: 14%;
  height: 20%;
  background: #3854a4;
  border: 2px solid;
  border-radius: 30px 30px 130px 130px / 160px 160px 180px 180px;
  z-index: 2;
}

.legs::before {
  left: calc((100% - 1px)/2);
  bottom: 0;
  width: 1px;
  height: 10%;
  background: #000;
}

.boots {
  position: absolute;
  left: calc((100% - 7%)/2);
  top: 51%;
  width: 7%;
  height: 14.5%;
  background: red;
  border-radius: 70px 70px 90px 90px / 160px 160px 200px 200px;
  z-index: 1;
}
            
          
!
999px
Loading ..................

Console