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.

            
              <!-- Nora <3 -->
<div class="demo">
  <div class="nora">
    <svg viewBox="0 0 260 190">
      <path class="b-fin" fill="#252A46" d="M75.3 166.3c-1.5-2-2.8-4.1-4.1-6.2 -1.9-3.3-9.8-15.9-4.3-18.8 6.6-3.5 17.1 6 17.1 6 7.9 1.3 15.5-0.7 17.2 26.4 0.2 2.8 0.5 7.7-2.1 9.7 -3.4 2.6-8.7-1.8-11.2-3.9C83.2 175.6 78.9 171.2 75.3 166.3z"/>
      <path class="body" fill="#252A46" d="M253 108.9c-8.8 8.1-20.2 8.6-28.3 7.1 -0.4 0.2-0.8 0.4-1.3 0.6 -1.1 0.6-3.2 8.4-3.9 9.7 -4.1 8-10 15-17 20.6 -24.9 20.3-63.4 21.2-94 20 -29.4-1.1-67.6-8.5-69.3-44.3 -1.3-26.5 15.4-52 41-59.5 33.5-9.8 62.8 4.7 75.5 36.7 13.8 34.9 55.1 27.6 56 5.7 -2.4-7.4-3.2-18.9 3.6-29.5 1-1.6 2.8-4.4 5-4.4 2.9-0.1 4 4.4 4.6 6.6 1 4 1.6 8.1 1.6 12.2 0 1.7-0.1 3.3-0.2 5 -0.1 0.8-0.2 2.5-0.5 4.4h17.1c0 0 0 0 0 0 2.2-0.1 4.3-0.1 6.4 0.1 2.2 0.2 6.9 0.5 7.3 3.4C256.8 105.4 254.3 107.6 253 108.9z"/>
      <path class="stomach" fill="#33CCFF" stroke="#33CCFF" stroke-width="0.4" stroke-miterlimit="10" d="M223.4 116.6c0.8-1-3.2 8.4-3.9 9.7 -4.1 8-10 15-16.9 20.6 -24.9 20.3-63.4 21.2-94 20 -19-0.7-28.7-2.3-43.7-8.5 0 0 6.3-8 53.3-7.3S195.4 153.8 223.4 116.6z"/>
      <path class="f-fin" fill="#252A46" d="M128.3 163.3c-1.5-2-2.8-4.1-4.1-6.2 -1.9-3.3-9.8-15.9-4.3-18.8 6.6-3.5 17.1 6 17.1 6 7.9 1.3 15.5-0.7 17.2 26.4 0.2 2.8 0.5 7.7-2.1 9.7 -3.4 2.6-8.7-1.8-11.2-3.9C136.2 172.6 131.9 168.2 128.3 163.3z"/>
      <circle class="r-eye" fill="#FFFFFF" cx="53.8" cy="107.7" r="7.8"/>
      <circle class="l-eye" fill="#FFFFFF" cx="97.9" cy="107.7" r="7.8"/>
      <path class="mouth" fill="#EF3444" d="M69.4 128.6c0 0 6.4 9.4 14 0"/>
        <g class="eyes">
          <circle class="l-pupil" fill="#333333" cx="53.6" cy="108" r="4.5"/>
          <circle class="r-pupil" fill="#333333" cx="97.7" cy="108" r="4.5"/>
          <ellipse class="eye-dot" fill="#FFFFFF" cx="55.3" cy="106.6" rx="0.6" ry="1.4"/>
          <ellipse class="eye-dot" fill="#FFFFFF" cx="99.9" cy="106.6" rx="0.6" ry="1.4"/>
        </g>
      <path class="tusk" fill="#33CCFF" d="M4.9 13c-0.6-0.8-1.1-1.7-1.3-2.7C3.2 8.8 3.7 6.9 5.1 6.2c1.9-1 4.2 0.6 5.8 2 22.6 20.6 42.3 43.5 63.2 65.7 2.7 2.8 5.5 6.1 5.2 10 -0.3 3.7-3.2 6-6.8 5.9 -4.6-0.1-6.9-3.4-9.6-6.6 -8.8-10.5-17.6-21-26.4-31.6C26.2 39.3 16 26.9 6 14.4 5.6 13.9 5.3 13.5 4.9 13z"/>
      <ellipse class="l-cheek" fill="#252A46" cx="54.6" cy="116.4" rx="10" ry="2.7"/>
      <ellipse class="r-cheek" fill="#252A46" cx="97.6" cy="116.4" rx="10" ry="2.7"/>
    </svg>
    <img class="fishy" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/80625/fish2.svg" />
  </div>
</div>
<button>FEED AGAIN!</button>
  

            
          
!
            
              body {
  background: #EAFAFF;
}

.demo {
  position: relative;
}

.fishy {
  top: 250px;
  left: 400px;
  position: absolute;
  width: 50px;
  z-index: 10;
  animation: food 3s forwards;
}

svg {
  margin: 40px 0 0 500px;
  width: 400px;
  animation: body-motion 10s infinite;
  position: relative;
  z-index: 1;
}

.eyes {
  animation: shifty 5s infinite;
}

.b-fin,
.f-fin {
  animation: swim 5s infinite;
}

.l-cheek,
.r-cheek {
  animation: cheeks 5s infinite;
}

.mouth {
  animation: eat 1s 2900ms forwards;
}

button {
  position: absolute;
  top: 400px;
  Left: 500px;
  padding: 5px 10px;
  background: none;
  border: 2px solid #999cab;
  border-radius: 5px;
  color: #999cab;
  outline: none;
}

button:hover {
  color: #89D55E;
  border-color: #89D55E;
}

// Begin animations
@keyframes shifty {
  10% {
    transform: translateY(2px);
  }
  30% {
    transform: translateX(4px);
  }
  50% {
    transform: translateY(2px);
  }
  70% {
    transform: translateX(-3px);
  }
  90% {
    transform: translateY(-3px);
  }
}

@keyframes body-motion {
  40% {
    transform: translateY(30px) rotate(3deg);
  }
  80% {
    transform: translate(-20px) rotate(-3deg);
  }
}

@keyframes swim {
  50% {
    transform: translateX(1px) rotate(-2deg);
  }
}

@keyframes cheeks {
  50% {
    transform: translateY(-3px);
  }
}

@keyframes eat {
  10% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  30% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  70% {
    opacity: 0;
  }
  80% {
    opacity: 1;
  }
  90% {
    opacity: 0;
  }
}

@keyframes food {
  99% {
    transform: translateX(180px);
    opacity: 1;
  }
  100%{
    transform: translateX(180px);
    opacity: 0;
  }
}
            
          
!
            
              $('button').click(function() {
  var demo = $('.demo');
  var demoClone = demo.clone();
  
  demo.remove();
  $('body').append(demoClone);
});
            
          
!
999px
Loading ..................

Console