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" class="toggle-checkbox" type="checkbox"><label for="trigger">Yummy</label>



<div class="z">
  <svg xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 250 400"><g id="caveman" transform="matrix(1.00467 0 0 1 21 27)"><path id="rarm" fill="#91c1a3" d="M150 165h30v10h9v10h10v10h10v10h10v34h-29v-15h-10v-9h-10v148h17l8 5v32h-65v-87h-10v87H55v-34l6-3h20V215H70v9h-6v15H31v-34h10v-10h10v-10h10v-10h10v-10h29v-10h50v10z" transform="matrix(.99536 0 0 1 -21 -27)"/><path fill="#aacfb8" d="M205 341v2h2v5h-6v-2h-1v-1h-2v-4h7z" transform="matrix(.99536 0 0 1 -33 -6)"/><path fill="#aacfb8" d="M205 341v2h2v5h-6v-2h-1v-1h-2v-4h7z" transform="matrix(-.99536 0 0 1 240 -6)"/><path id="hair" fill="#3a3a3a" d="M60 10h9V0h69v10h11v19H60V10z" transform="matrix(.99536 0 0 1 0 0)"/><path id="face" fill="#9cd3b3" d="M140 30h9v19h20v30h-11v30h-9v9h-9v10h-20v10H89v-10H69v-10h-9v-9H50V79H40V49h20V30h9V20h71v10z" transform="matrix(.99536 0 0 1 0 0)"/><path id="lefteye" fill="#fbeb8e" d="M109 40h33v30h-33z" transform="matrix(.89986 0 0 1 11 0)"/><path id="righteye" fill="#fbeb8e" d="M69 40h29v30H69z"/><path id="mouth" fill="#758b7c" d="M89 99h30v10H89z"/><path id="nose" fill="#91c1a3" d="M99 59h10v29H99z"/><path id="rightpupil" fill="#444445" d="M69 49h10v10H69z"/><path id="leftpupil" fill="#444445" d="M119 40h10v10h-10z"/><path id="hair1" fill="#3a3a3a" d="M148 30h10v39h-10z"/><path id="hair2" fill="#3a3a3a" d="M49 30h10v39H49z"/><g><path fill="#976339" d="M215 173v9h9v14h5v27h3v19h2v49h-7v20h-9v9h-53v-6h-6v-14h-7v-14h-4v-12h-4v-12h-5v-9h-8v-12h-7v-6l-10-1v-8h-8v-9h-9v-9H86v-6H75v-7h-7v-22h40v-2h15v-4h17v-3h51v2h13v7h11z" transform="matrix(0 1 .681 0 -63 68)"/></g><g><clipPath id="_clip1"><path d="M56 283h5v9h10v5h18v3h13v2h33v-7h14v-9h6v-53h-4v-6h-9v-7h-10v-4h-8v-4h-8v-5h-7v-7h-7v-8h-5v-10h-6v-8h-6v-9h-6v-11h-4v-11h-5v-7H55v40h-1v15h-3v17h-2v51h1v13h6v11z"/></clipPath><g clip-path="url(#_clip1)"><path fill="#422b10" d="M600 338h75v37h38v38h37v187H450v-37h-75v-38h-37v-37h-38V375h38v-37h75v-38h187v38z" transform="matrix(-.19914 0 0 .20007 153 159)"/><path fill="#422b10" d="M136 273h4v12h-4v5h-18v-5h-4v-12h4v-4h18v4z" transform="matrix(0 1 -.99536 0 387 132)"/><path fill="#422b10" d="M146 273h4v12h-4v5h-28v-5h-4v-12h4v-4h28v4z" transform="matrix(.99536 0 0 1 -41 20)"/><path fill="#422b10" d="M136 273h4v12h-4v5h-18v-5h-4v-12h4v-4h18v4z" transform="matrix(0 1 -.99536 0 330 60)"/><path fill="#422b10" d="M136 273h4v12h-4v5h-18v-5h-4v-12h4v-4h18v4z" transform="matrix(0 1 -.99536 0 335 8)"/><path fill="#422b10" d="M600 338h75v37h38v38h37v187H450v-37h-75v-38h-37v-37h-38V375h38v-37h75v-38h187v38z" transform="matrix(0 .14262 .14195 0 85 223)"/><path fill="#422b10" d="M600 338h75v37h38v38h37v187H450v-37h-75v-38h-37v-37h-38V375h38v-37h75v-38h187v38z" transform="matrix(0 -.14262 .14195 0 30 262)"/><path fill="#422b10" d="M600 338h75v37h38v38h37v187H450v-37h-75v-38h-37v-37h-38V375h38v-37h75v-38h187v38z" transform="matrix(0 -.14262 .14195 0 80 291)"/></g></g><g id="righthand"><path fill="#9cd3b3" d="M6 207h4v-10h50v10H49v20h-9v10H20v-10H10v-10H6v-10z" transform="matrix(.99536 0 0 1 0 0)"/></g><g id="lefthand"><path fill="#9cd3b3" d="M148 197h50v10h6v10h-6v10h-10v10h-20v-10h-9v-20h-11v-10z" transform="matrix(.99536 0 0 1 0 0)"/></g></g></svg>
</div>
<div class="trex">
<svg xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 960 760"><path fill="#345a2f" d="M826 292h20v14l25-1 1 12 25-1v14h-25v12h-25v14l-20 1 1 17-66 2-2-99 65-2 1 17zM834 406l20-1v14l26-1v12l25-1 1 14h-26l1 12h-26l1 14-20 1v17l-65 2-3-99 65-2 1 18zM862 519l20-1 1 14 25-1v11l26-1v14l-25 1v11l-25 1 1 14-21 1 1 18-66 2-3-99 65-3 1 18zM891 629h20l1 14 25-1 1 11 25-1v14l-25 1v11l-25 1 1 14-21 1 1 17-65 3-4-100 65-2 1 17z"/><g id="bottom" transform="translate(-454 -482)"><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 10 1814)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 29 1813)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 49 1812)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 68 1811)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 88 1809)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 107 1808)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 126 1807)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 146 1805)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 165 1804)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 184 1803)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 204 1803)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 223 1802)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 243 1802)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 262 1801)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 281 1800)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 301 1799)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 320 1799)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="matrix(1 0 0 -.89797 339 1799)"/><path id="body" fill="#3c6335" d="M817 1243v-140h-38v-9h-39v-6l-38-1v-6h-35v-6h-32v-7h-36v-6h-29v-7h-28v-9h-23v-8h-23v-11h-18v-12h-9v-12h6v-9h9v-9h24v-3h62v-3h63v-4h62v-3h64v-4h62v-3h33v-6l-6-91 28-32 53-304h203v8h38v8h12v8h11v8h12v7h10v9l9-1v11h8v10h8v14h6v15h4v11h1v1h1v187h12v70h16v68h14v70h17v207H817z"/></g><g id="topjaw"><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-455 -387) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-436 -385) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-416 -384) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-397 -383) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-378 -382) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-358 -380) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-339 -379) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-320 -378) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-300 -377) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-281 -375) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-261 -375) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-242 -375) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-223 -375) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-203 -373) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-184 -372) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-164 -372) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-145 -372) scale(1 .89797)"/><path fill="#d5d2d1" d="M493 934h-3v-13h19v13h-3v5h-3v5h-2v5h-2v-5h-2v-5h-4v-5z" transform="translate(-126 -371) scale(1 .89797)"/><path fill="#3c6335" d="M854 959v-9h-33v-4h-62v-3h-64v-4h-62v-3h-63v-4h-62v-3h-20v-15h-9v-14h-9v-15h-9v-14h-5l-1-144h5v-19h6v-18h9v-14h8v-13h10v-11h10v-10h13v-11h11v-9h13v-11h39v-12l245 1v-4h9v-10h10v-9h10v-9h13v-9h11v-8h13v-9h39v-10c180 41 225 139 205 264-27 142-111 209-280 163z" transform="translate(-455 -481)"/><path fill="#fff" d="M1931 628h23v23h23v124h-23v23h-23v23h-123v-23h-24v-23h-22V652h22v-24h23v-24h124v24z" transform="translate(-195 -71) scale(.33427)"/><path fill="#172815" d="M176 42h4v30h-4v4h-10v-4h-4V42h4v-4h10v4z" transform="translate(-123 167)"/><path fill="#172815" d="M1931 628h23v23h23v124h-23v23h-23v23h-123v-23h-24v-23h-22V652h22v-24h23v-24h124v24z" transform="matrix(.21067 0 0 .21067 23 20)"/></g></svg>
</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

              
                .toggle-checkbox:checked ~ .trex { 
  animation: 4s linear 0s headmove forwards;
}

@keyframes headmove {
  0%, 100% {
    transform: rotate(-90deg) translateX( 0 ) translateY(0);
  }
  40%,48% {
    transform: rotate(-90deg) translateX( -500px ) translateY(0);
  }
  53%, 60% {
    transform: rotate(-90deg) translateX( -500px ) translateY(-30px) ;
  }
}
.toggle-checkbox:checked ~ .trex #topjaw { 
  animation: 4s linear 0s snap forwards;
}

@keyframes snap {
  0%, 49% {
    transform: rotate(25deg);
  }
  54%, 100% {
    transform: rotate(10deg);
  }
}
.toggle-checkbox:checked ~ .z { 
  animation: 4s linear 0s rise forwards;
}

@keyframes rise {
  0%, 60% {
    transform: translateY( 0 );
  }
  100% {
    transform: translateY( -500px );
  }
}


.z {
  max-width: 200px;
  margin: auto;
}

body {
  background-color: #111133;
  overflow: hidden;
}
.trex {
  transform: rotate(-90deg);
  position: absolute;
  top: -960px;
  width: 960px;
  height: 660px;
  left: calc( 50vw - 570px);
}
#topjaw {
  transform-origin: 47% 60%;
  transform: rotate(25deg);
}

.logo {
  width: 100%;
  max-width: 400px;
  position: absolute;
  top: 0;
  right: 0;
}
.logo img {
  width: 100%;
}
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: 140px;
  height: 30px;
  text-align: center;
  font-weight: bold;
  display: block;
  border-radius: 7px;
  box-shadow: 3px 3px 0 #660000;
  cursor: pointer;
}
              
            
!

JS

              
                
              
            
!
999px

Console