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 class="logic-checkbox" type="checkbox" id="toggleGame">
<input class="logic-checkbox" type="checkbox" id="HowToPlayPopup">
<input class="logic-checkbox" type="checkbox" id="whoAmIPopup">
<section class="game-menu-frame"> 
  <!--game navigation-->
  <ul class="game-nav-list">
    <li class="game-nav-item">
      <label for="toggleGame" tabindex="0" class="button">Save the World</label>
    </li>
    <li class="game-nav-item">
      <label for="HowToPlayPopup" tabindex="0" class="button">How to Play</label>
    </li>
    <li class="game-nav-item">
      <label for="whoAmIPopup" tabindex="0" class="button">Who Am I</label>
    </li>
  </ul>
</section>
<section class="game-frame">
    GAME FRAME
     <label for="toggleGame" tabindex="0" class="button">Quit Game</label>
</section>
<section class="popup common-content" id="whoAmI">
    POPUP - WHO AM I
    <label for="whoAmIPopup" tabindex="0" class="button">close popup</label>
</section>
<section class="popup common-content" id="HowToPlay">
    POPUP - HOW TO PLAY
    <label for="HowToPlayPopup" tabindex="0" class="button">close popup</label>
</section>
              
            
!

CSS

              
                html{font-size:25px; font-family:arial;}
.button{
  display:inline-block;
  padding:5px;
  border:solid 2px #000;  
  border-radius:5px;
  margin-bottom:10px;
  background-color:#bbb;
  color:black;
}

/* checkbox which triggering popup */
#whoAmIPopup:checked ~ #whoAmI,
#HowToPlayPopup:checked ~ #HowToPlay{
  display: block;
}
/* checkbox of start playing - 
 trigger by pressing "save the world" button */
#toggleGame:checked{
    ~ .game-menu-frame{ display: none; }
    ~ .game-frame{ display: block; }    
}

/* hide popup and game frame*/
#whoAmI,
#HowToPlay,
.game-frame{display: none;}

.game-menu-frame{
  background:yellow; border:solid 2px #000;
}

.game-frame{background:green; padding:50px; color:#fff; border:solid 2px #000;}

.popup{background:blue; padding:50px; color:#fff; border:solid 2px #000;}
              
            
!

JS

              
                
              
            
!
999px

Console