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">Tally Ho!</label>

<div class="zwrap"><div class="z"><div class="boat"></div></div></div>
<div class="waves" id="w1"></div>
<div class="dwrap"><div class="divberg"></div></div>
<div class="waves"></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 ~ .zwrap { 
  animation: 10s linear 0s boatfloat forwards;
}
.toggle-checkbox:checked ~ .zwrap .boat{ 
  animation: 10s linear 0s crash forwards;
}
.toggle-checkbox:checked ~ .zwrap .z { 
  animation: 3.2s ease-in-out 0s bob alternate infinite forwards;
}
.toggle-checkbox:checked ~ .waves { 
  animation: 40s linear 0s waves infinite forwards;
}
.toggle-checkbox:checked ~ .dwrap .divberg { 
  animation: 3.8s ease-in-out 0s bob alternate infinite forwards;
}
.toggle-checkbox:checked ~ .dwrap { 
  animation: 10s ease-in-out 0s divbergfloat forwards;
}

@keyframes bob {
  0% {
    transform: translateY( -20px );
  }
  100% {
    transform: translateY( 20px );
  }
}
@keyframes crash {
  0%, 89.99999% {
    background-position: 0;
  }
  90%, 100% {
    background-position: -600px;
  }
}
@keyframes boatfloat {
  0% {
    transform: translate( 200em, 0 );
  }
  90% {
    transform: translate( 475px, 0 );
  }
  91% {
    transform: translate( 500px, 0 );
  }
  100% {
    transform: translate( 485px, 500px );
  }
}

@keyframes divbergfloat {
  0% {
    transform: translateX( 0 );
  }
  100% {
    transform: translateX( 800px );
  }
}

@keyframes waves {
  0% {
    transform: translate( 0, -20px );
  }
  50% {
    transform: translate( 250vw, 20px );
  }
  100% {
    transform: translate( 500vw, -20px );
  }
}

.zwrap {
  width: 600px;
  height: 400px;
  position: absolute;
  bottom: 100px;
  left: 0;
  transform: translateX( 200em );
  z-index: 80;
}
.z {
  width: 600px;
  height: 400px;
}
.boat {
  width: 600px;
  height: 400px;
  background-image: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1804713/Boaty-crash.png");
  overflow: hidden;
}
.waves {
  background-image: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1804713/waves.png");
  background-repeat: repeat-x;
  width: 600vw;
  height: 400px;
  position: absolute;
  bottom: -200px;
  left: -500vw;
}
.waves::after {
  content: " ";
  width: 600vw;
  height: 300px;
  margin-left: 50%;
  transform: translateX(-50%);
  position: absolute;
  bottom: 0;
  background-color: #9FD9FD;
}
#w1 {
  opacity: 0.5;
  z-index: 100;
}
.divberg {
  background-image: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1804713/divberg.svg");
  width: 700px;
  height: 500px;
}
.dwrap{ 
  position: absolute;
  bottom: -80px;
  z-index: 90;
  left: -700px;
  transform: translateX( 0 );
}
body {
  background-color: lightslategray;
  overflow: hidden;
}
.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