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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

            
              
<div class="m-posterContainer">
  <input type="checkbox" class="a-toggle" id="posterCheck">
  <div class="o-poster">
    <div class="m-frame">
      <div class="m-poster">
        <img class="a-poster" src="https://upload.wikimedia.org/wikipedia/en/8/88/Donkey_Kong_Jr_Math_box.jpg" alt="donkey kong first poster">
      </div>
    </div>
    <div class="m-lightToggle">
      <label class="a-wire" for="posterCheck"></label>
    </div>
  </div>
</div>
<div class="m-posterContainer">
  <input type="checkbox" class="a-toggle" id="posterCheck2" checked>
  <div class="o-poster">
    <div class="m-frame">
      <div class="m-poster">
        <img class="a-poster" src="https://upload.wikimedia.org/wikipedia/pt/2/2a/Donkey-Kong-capa.PNG" alt="donkey kong first poster">
        
      </div>
    </div>
    <div class="m-lightToggle">
      <label class="a-wire" for="posterCheck2"></label>
    </div>
  </div>
</div>
<div class="m-posterContainer">
  <input type="checkbox" class="a-toggle" id="posterCheck3">
  <div class="o-poster">
    <div class="m-frame">
      <div class="m-poster">
        <img class="a-poster" src="https://upload.wikimedia.org/wikipedia/en/2/27/Dk3_arcade.jpg" alt="donkey kong first poster">
      </div>
    </div>
    <div class="m-lightToggle">
      <label class="a-wire" for="posterCheck3"></label>
    </div>
  </div>
</div>
            
          
!
            
              body {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  background-color: #bf360c;
  background-image: url('data:image/svg+xml,%3Csvg width="42" height="44" viewBox="0 0 42 44" xmlns="http://www.w3.org/2000/svg"%3E%3Cg id="Page-1" fill="none" fill-rule="evenodd"%3E%3Cg id="brick-wall" fill="#000000" fill-opacity="0.2"%3E%3Cpath d="M0 0h42v44H0V0zm1 1h40v20H1V1zM0 23h20v20H0V23zm22 0h20v20H22V23z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  background-attachment: scroll;

  &:after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(
      ellipse at top,
      transparent 0,
      rgba(#000, 0.8) 70%
    );
    pointer-events: none;
    mix-blend-mode: lighten;
  }
}
.a-message {
  flex: 1 0 100%;
  text-align: center;
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: white;
  text-shadow: 1px 1px 0 black;
  margin: 16px 0;
}

.m-posterContainer {
  margin: 0px 60px 140px;
}

.a-toggle {
  display: none;
}
.o-poster {
  position: relative;
}
.m-frame {
  padding: 16px;
  background-color: #4e342e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='32' viewBox='0 0 16 32'%3E%3Cg fill='#000000' fill-opacity='0.1'%3E%3Cpath fill-rule='evenodd' d='M0 24h4v2H0v-2zm0 4h6v2H0v-2zm0-8h2v2H0v-2zM0 0h4v2H0V0zm0 4h2v2H0V4zm16 20h-6v2h6v-2zm0 4H8v2h8v-2zm0-8h-4v2h4v-2zm0-20h-6v2h6V0zm0 4h-4v2h4V4zm-2 12h2v2h-2v-2zm0-8h2v2h-2V8zM2 8h10v2H2V8zm0 8h10v2H2v-2zm-2-4h14v2H0v-2zm4-8h6v2H4V4zm0 16h6v2H4v-2zM6 0h2v2H6V0zm0 24h2v2H6v-2z'/%3E%3C/g%3E%3C/svg%3E");
  box-shadow: 0 10px 16px 2px rgba(#000, 0.8);

  .a-toggle:checked + .o-poster & {
    animation: frameLightFlickering 7s infinite;
  }
}
.m-poster {
  box-shadow: inset 0 0 8px 0;
}
.a-poster {
  filter: brightness(0.4);
  height: 340px;
  &::selection {
    background: transparent;
    color: transparent;
  }
  .a-toggle:checked + .o-poster & {
    //filter: brightness(1);
    animation-name: posterLightFlickering;
    animation-iteration-count: infinite;
  }

  .m-posterContainer:nth-of-type(1) & {
    animation-duration: 7s;
  }
  .m-posterContainer:nth-of-type(2) & {
    animation-duration: 10s;
  }
  .m-posterContainer:nth-of-type(3) & {
    animation-duration: 5s;
  }
}

.m-lightToggle {
  filter: drop-shadow(0 6px 2px);
  position: absolute;
  top: 100%;
  left: 85%;
}
.a-wire {
  display: block;
  width: 2px;
  height: 80px;
  background-color: #333;
  position: relative;
  cursor: pointer;
  transition: height 0.2s ease;
  transform-origin: center top;

  transform: rotate(-0.5deg);
  animation: wirePendulum 2s infinite;

  .m-posterContainer:nth-of-type(1) & {
    animation-delay: 3s;
  }
  .m-posterContainer:nth-of-type(2) & {
  }
  .m-posterContainer:nth-of-type(3) & {
    animation-delay: 1;
  }

  &:after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 8px;
    background-color: transparent;
    box-shadow: inset 0 0 3px 1px, inset 0 0 0 3px white;
    display: block;
    position: absolute;
    top: 100%;
    left: -7px;
  }
  &:active {
    height: 88px;
  }
}
@keyframes posterLightFlickering {
  0%,
  14%,
  14.2%,
  49.6%,
  51%,
  52%,
  52.2%,
  100% {
    filter: brightness(1);
  }
  14.1%,
  49.7%,
  52.1% {
    filter: brightness(0.4);
  }
}

@keyframes frameLightFlickering {
  0%,
  14%,
  14.2%,
  49.6%,
  51%,
  52%,
  52.2%,
  100% {
    box-shadow: 0 10px 16px 2px rgba(#000, 0.8), 0 0 12px rgba(#000, 0.8),
      0 0 100px 0 rgba(#ffffee, 0.4);
  }
  14.1%,
  49.7%,
  52.1% {
    box-shadow: 0 10px 16px 2px rgba(#000, 0.8);
  }
}

@keyframes wirePendulum {
  0%,
  100% {
    transform: rotate(-0.5deg);
  }
  50% {
    transform: rotate(0.5deg);
  }
}

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console