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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <input id="trigger" type="checkbox"><label for="trigger">FIRE!</label>
<div class="wrap">
<div class="cannon">
  <svg id="cannon" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 800 600">
  <path class="barrel" d="M634 24.9L663.6 12l89.1 204.1-29.4 12.9 10.9 24.9L582.4 320l10 22.8-157.7 68.9 11 25.3-236.1 103-11-25.2-19.9 8.6-10-22.8-21.4 9.4-10.9-24.9-24.2 10.6-89.1-204.1L47.3 281l-10.9-24.9 21.5-9.4L48 224l19.9-8.6-11-25.3L292.7 87l11 25.3 157.8-68.9 10 22.8L623.2 0l10.9 24.9z"/>
  <path fill="#7b0f0f" d="M337.3 303.5h25.2v48H386V386h26.7v61.5h21.9V553h22.2v47H120v-47h22.2V447.5h22V386h26.6v-34.5h23.6v-48h25.2v-37h97.6v37zm-37.9-.5v-9.6h-21.8v9.6H268v21.9h9.6v9.6h21.8v-9.6h9.6V303h-9.6z"/>
</svg>
  <svg id="cannon2" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 800 600">
  <path class="barrel" d="M634 24.9L663.6 12l89.1 204.1-29.4 12.9 10.9 24.9L582.4 320l10 22.8-157.7 68.9 11 25.3-236.1 103-11-25.2-19.9 8.6-10-22.8-21.4 9.4-10.9-24.9-24.2 10.6-89.1-204.1L47.3 281l-10.9-24.9 21.5-9.4L48 224l19.9-8.6-11-25.3L292.7 87l11 25.3 157.8-68.9 10 22.8L623.2 0l10.9 24.9z"/>
  <path fill="#7b0f0f" d="M337.3 303.5h25.2v48H386V386h26.7v61.5h21.9V553h22.2v47H120v-47h22.2V447.5h22V386h26.6v-34.5h23.6v-48h25.2v-37h97.6v37zm-37.9-.5v-9.6h-21.8v9.6H268v21.9h9.6v9.6h21.8v-9.6h9.6V303h-9.6z"/>
</svg>
</div>
<div id="d1" class="daredevil"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/1804713/daredevil.svg" alt="Zombie Knievel"></div>
<div id="d2" class="daredevil"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/1804713/daredevil.svg" alt="Zombie Knievel"></div>
<div class="pow">POW</div>
  <div class="pow p2"><span>POW</span></div>
<div class="patch"></div>
<div class="patch pa2"></div>
</div>
<div class="ground"></div>
<div class="logo"><a href="https://undead.institute" target="_blank"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/1804713/UndeadInsti-LogoOnWhite.png" alt="Getting Braaains should be fun"></a></div>


              
            
!

CSS

              
                input:checked ~ .wrap #d1 {
  animation: 2s linear 0s fire forwards;
}
input:checked ~ .wrap #d2 {
  animation: 2s linear 0s fire2 forwards;
}
input:checked ~ .wrap .pow {
  animation: 2s linear 0s pow forwards;
}
input:checked ~ .wrap .cannon #cannon3 {
  animation: 2s linear 0s cannon forwards;
}
.wrap {
  max-width: 600px;
  width: 100%;
  position: relative;
  height: 100vh;
  margin: auto;
  bottom: 4.5em;
}
.daredevil {
  width: 50px;
  position: absolute;
  bottom: 0;
  z-index: 0;
}
#d1 {
  transform: translate(105px, -60px) rotate(70deg);
}
#d2 {
  transform: rotateY( 180deg ) translate(105px, -60px) rotate(70deg);
  right: 0;
  backface-visibility: visible;
}
.cannon svg {
  width: 150px;
  position: absolute;
  bottom: 10px;
  z-index: 10;
}
#cannon2 {
  right: 0;
  transform: rotateY( 180deg );
  backface-visibility: visible;
}
body {
  overflow: hidden;
  background-color: lightblue;
}
input{
  display: none;
}
input:checked + label {
  box-shadow: inset 3px 3px 2px #660000;
  transform: translate(3px, 3px);
}
label {
  font-size: 1.5em;
  color: #FFF;
  background-color: #960B0B;
  width: 80px;
  height: 30px;
  text-align: center;
  font-weight: bold;
  display: block;
  border-radius: 7px;
  box-shadow: 3px 3px 0 #660000;
  cursor: pointer;
}
.ground {
  width: 102vw;
  transform: translateX(-50%);
  margin-left: 50%;
  height: 100px;
  background-color: forestgreen;
  position: absolute;
  bottom: -5px;
  z-index: -1;
}
.patch {
  width: 100px;
  height: 20px;
  background-color: forestgreen;
  position: absolute;
  left: 980px;
  bottom: 0;
  z-index: 1;
}
.pa2 {
  right: 980px;
  left: auto;
  z-index: 100;
}
@keyframes fire {
  0% {
    transform: translate(105px, -60px) rotate(70deg);
  }
  5% {
    transform: translate(90px, -56px) rotate(70deg);
  }
  36% {
    transform: translate(435px, -140px) rotate(85deg);
  }
  46% {
    transform: translate(530px, -145px) rotate(90deg);
  }
  56% {
    transform: translate(625px, -140px) rotate(95deg);
  }
  99% {
    transform: translate(990px, 15px) rotate(110deg);
  }
  100% {
    transform: translate(995px, 8px) rotate(140deg);
  }
}

@keyframes fire2 {
  0% {
    transform: rotateY( 180deg ) translate(105px, -60px) rotate(70deg);
  }
  5% {
    transform: rotateY( 180deg ) translate(90px, -56px) rotate(70deg);
  }
  36% {
    transform: rotateY( 180deg ) translate(435px, -140px) rotate(85deg);
  }
  46% {
    transform: rotateY( 180deg ) translate(530px, -145px) rotate(90deg);
  }
  56% {
    transform: rotateY( 180deg ) translate(625px, -140px) rotate(95deg);
  }
  99% {
    transform: rotateY( 180deg ) translate(990px, 15px) rotate(110deg);
  }
  100% {
    transform: rotateY( 180deg ) translate(995px, 8px) rotate(140deg);
  }
}

.pow {
  font-family: Verdana, sans-serif;
  border-radius: 50%;
  width: 40px;
  height: 30px;
  padding-top: 10px;
  color: #FFF;
  text-align: center;
  background-color: hsla(0, 0%, 50%, 1);
  box-shadow: 12px 12px 0 hsla(0, 0%, 50%, 0.5), 7px 7px 0 hsla(0, 0%, 50%, 0.5), 12px -12px 0 hsla(0, 0%, 50%, 0.5), 7px -7px 0 hsla(0, 0%, 50%, 0.5), -12px 12px 0 hsla(0, 0%, 50%, 0.5), -7px 7px 0 hsla(0, 0%, 50%, 0.5), -12px -12px 0 hsla(0, 0%, 50%, 0.5), -7px -7px 0 hsla(0, 0%, 50%, 0.5), 24px 0 0 hsla(0, 0%, 50%, 0.5), -24px 0 0 hsla(0, 0%, 50%, 0.5), 18px -7px 0 hsla(0, 0%, 50%, 0.5), -18px -7px 0 hsla(0, 0%, 50%, 0.5), 18px 7px 0 hsla(0, 0%, 50%, 0.5), -18px 7px 0 hsla(0, 0%, 50%, 0.5);
  position: absolute;
  bottom: 0;
  transform: translate(140px, -90px) rotate(70deg);
  opacity: 0;
}
.p2 {
  transform: rotateY( 180deg ) translate(140px, -90px) rotate(70deg);
  right: 0;
}
.p2 span {
  transform: rotateY( -180deg );
  display: block;
}
@keyframes pow {
  0% {
    opacity: 0;
  }
  7% {
    opacity: 1;
  }
  25% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes cannon {
  0%, 100% {
    transform: translate(0,0) rotate(0);
  }
  5% {
    transform: translate(-2px, 1px) rotate(-1deg);
  }

10% {
    transform: translate(0,0) rotate(0);
  }
}
.logo {
  width: 100%;
  max-width: 400px;
  position: absolute;
 top: 0;
  right: 0;
  z-index: 1000;
}
.logo img {
  width: 100%;
}
@media (max-width: 600px) {  
  .logo {
    width: 100%;
    max-width: 200px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console