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 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.

Quick-add: + add another resource

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.

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.

            
              #ship.shake
  #window
    #morty
      #shirt
        #left-arm
        #left-sleeve
        #shirt-front
        #right-arm
        #right-sleeve
      #hair-head.nod
        #hair
        #head
          #face
            #right-ear
              .inner-ear
            #nose
            #right-eye
              .pupil
            #right-lid
            #right-brow
            #left-lid
            #left-eye
              .pupil
            #left-brow
            #mouth
            
          
!
            
              @keyframes nod {
  0% {
    top: 0;
    left: 0;
    transform: rotate(0);
  }
  50% {
    top: -.1em;
    left: 1.2em;
    transform: rotate(5deg);
  }
  100% {
    top: 0;
    left: 0;
    transform: rotate(0);
  }
}

@keyframes shake {
  0% {
    left: 50%;
  }
  25% {
    bottom: .25em;
  }
  50% {
    left: 48%;
  }
  75% {
    bottom: -.25em;
  }
  100% {
    left: 50%;
  }
}

@keyframes pulse {
  0% {
    background-color: limegreen;
  }
  50% {
    background-color: orangered;
  }
  100% {
    background-color: limegreen;
  }
}

body {
  background-color:black;
  overflow: hidden;
}

#window {
  background-color: skyblue;
  background-size: cover;
  border: .1rem solid silver;
  border-radius: 50% 50% 45% 45%;
  height: 25rem;
  left: 50%;
  overflow: hidden;
  position: relative;
  bottom: 8rem;
  transform: translateX(-50%);
  width: 30rem;
}

#ship {
  background-color: #333;
  background-image: radial-gradient(farthest-corner at 3rem 3rem, #555 0%, #111 100%);
  border-radius: 50%;
  height: 25rem;
  left: 50%;
  margin-top: 10rem;
  position: relative;
  top: 50%;
  transform: translateX(-50%);
  width: 40rem;
  z-index: -1;
}

#morty {
  color: #fff;
  font-size: .9em;
  font-weight: 900;
  height: 100%;
  left: 5%;
  overflow: hidden !important;
  position: absolute;
  text-shadow: 0 0 1rem #000;
  bottom: -3rem;
  width: 100%;
}

#morty,
#morty * {
  box-sizing: border-box;
}

#hair {
  background: #835220;
  border: .1em solid #444;
  border-radius: 100% 100% 100% 100%;
  height: 13em;
  left: 1.85em;
  position: absolute;
  top: 1.75em;
  transform: rotate(-25deg);
  width: 13.2em;
}

#head {
  position: absolute;
  top: 3.6em;
  left: 3.5em;
}

#face {
  background: #f8c29c;
  height: 12.5em;
  width: 12.5em;
  
  border: .15em solid #444;
  border-radius: 50%;
  
  position: relative;
}

#right-eye {
  background: #fff;
  height: 4.5em;
  width: 4.5em;
  border: .1em solid #444;
  border-radius: 50%;
  
  position: absolute;
  top: 20%;
  right: 35%;
}

#left-eye {
  background: #fff;
  height: 4.2em;
  width: 3.9em;
  border: .1em solid #444;
  border-radius: 50%;
  
  position: absolute;
  top: 20%;
  right: -.35em;
}

.pupil {
  background: #444;
  border-radius: 50%;
  height: .3em;
  width: .3em;
  position: absolute;
  right: .35em;
  bottom: 1.75em;
}

#right-ear {
  background: #f8c29c;
  height: 2.3em;
  width: 2.5em;
  
  border: .15em solid #444;
  border-radius: 50%;
  
  position: absolute;
  bottom: 25%
}

.inner-ear {
  background: #f8c29c;
  height: 2.5em;
  width: 2em;
  
  border-radius: 50%;
  
  position: absolute;
  bottom: -.05em;
  left: .75em;
}

#right-brow {
  background: #f8c29c;
  height: 1.25em;
  width: 3em;
  
  border: .15em solid #444;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 100%;
  
  position: absolute;
  top: 7%;
  right: 45%;
  
  transform: rotate(-25deg);
}

#left-brow {
  background: transparent;
  height: .5em;
  width: 1.5em;
  
  border: .15em solid #444;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 100%;
  
  position: absolute;
  top: 14%;
  right: 10%;
  
  transform: rotate(25deg);
}

#right-lid {
  background: transparent;
  height: .9em;
  width: 2em;
  
  border: .1em solid #444;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 100%;
  
  position: absolute;
  top: 53%;
  right: 38%;
  
  transform: rotate(-25deg);
}


#left-lid {
  background: #f8c29c;
  height: 1.2em;
  width: 1.6em;
  
  border: .15em solid #444;
  border-left: 0;
  border-top: 0;
  border-right: 0;
  border-radius: 100%;
  
  position: absolute;
  top: 46%;
  right: -3%;
  
  transform: rotate(-60deg);
}

#mouth {
  background: #f8c29c;
  border: .15em solid #444;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 100% 100%;
  bottom: 15%;
  height: 1em;
  position: absolute;
  right: 20%;
  width: 4em;
}

#mouth.open {
  background: black;
  height: 1.5em;
  width: 4em;
  
  border: .1em solid #444;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 100% 100% ;
  
  position: absolute;
  bottom: 15%;
  right: 20%;
  transition: all ease .333s;
}

#mouth.open2 {
  background: black;
  height: .1em;
  width: 3em;
  
  border: .1em solid #444;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 100% 100% ;
  
  position: absolute;
  bottom: 20%;
  right: 25%;
  transition: all ease .333s;
}

#mouth.open3 {
  background: black;
  height: 1em;
  width: 1em;
  
  border: .1em solid #444;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 100% 100% ;
  
  position: absolute;
  bottom: 15%;
  right: 25%;
  transition: all ease .333s;
}

#nose {
  background: #f8c29c;
  height: 1.5em;
  width: 2em;
  
  border: .125em solid #444;
  border-left: 0;
  border-radius: 100%;
  
  position: absolute;
  top: 6.25em;
  right: 2.75em;
  
  transform: rotate(35deg);
}

#nose:before {
  background: #f8c29c;
  content: '';
  position: absolute;
  height: 1.65em;
  width: 1.5em;
  top: -.15em;
  left: -.65em;
}

#shirt {
  background: #fbf96b;
  height: 7.5em;
  width: 10em;
  
  border: .15em solid #444;
  border-bottom: 0;
  border-radius: 250% 250% 0 0;
  
  position: absolute;
  top: 15em;
  left: 4em;
}

#shirt-front {
  background: #fbf96b;
  height: 7em;
  width: 7.5em;
  
  border: .15em solid #444;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  
  position: absolute;
  left: 1em;
  bottom: -4em;
}

#right-sleeve {
  background: #fbf96b;
  height: 3.15em;
  width: 2.5em;
  
  border: .15em solid #444;
  border-left: 0;
  border-top: 0;
  
  position: absolute;
  left: 0;
  bottom: 0;
}

#left-sleeve {
  background: #fbf96b;
  height: 3.15em;
  width: 2.5em;
  
  border: .15em solid #444;
  border-right: 0;
  border-left: 0;
  border-top: 0;
  
  position: absolute;
  right: 0;
  bottom: 0;
}


#right-arm {
  background: #f8c29c;
  height: 4.2em;
  width: 1.65em;
  
  border: .15em solid #444;
  border-top: 0;
  border-bottom: 0;
  
  position: absolute;
  left: .5em;
  top: 7.2em;
}

#left-arm {
  background: #f8c29c;
  height: 4.2em;
  width: 1.65em;
  
  border: .15em solid #444;
  border-top: 0;
  border-bottom: 0;
  
  position: absolute;
  right: .25em;
  top: 7.2em;
}

#hair-head.nod {
  position: absolute;
  animation: nod .33s infinite;
}

.shake {
  animation: shake .2s infinite;
}

.shake #window {
  animation: pulse 1s infinite;
}
            
          
!
999px
Loading ..................

Console