css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="question-board active">
  <div class="board">
    <div class="row orange">
      <textarea cols="40" rows="2">Hier</textarea>
      <button>100</button>
      <button>200</button>
      <button>300</button>
      <button>600</button>
      <button>1000</button>
    </div>
    <div class="row blue">
      <textarea cols="40" rows="2">Deine</textarea>
      <button>100</button>
      <button>200</button>
      <button>300</button>
      <button>600</button>
      <button>1000</button>
    </div>
    <div class="row pink">
      <textarea cols="40" rows="2">Kategorien</textarea>
      <button>100</button>
      <button>200</button>
      <button>300</button>
      <button>600</button>
      <button>1000</button>
    </div>
    <div class="row darkblue">
      <textarea cols="40" rows="2">Eingeben</textarea>
      <button>100</button>
      <button>200</button>
      <button>300</button>
      <button>600</button>
      <button>1000</button>
    </div>
    <div class="row green">
      <textarea cols="40" rows="2">!!!!</textarea>
      <button>100</button>
      <button>200</button>
      <button>300</button>
      <button>600</button>
      <button>1000</button>
    </div>
    <input type="button" class="round-info" value="Punkte verdoppeln" onclick="nextround()"></input>
  </div>
</div>

<div class="points">
  <div class="row">
    <textarea class="player" cols="40" rows="1">Spieler 1</textarea>
    <textarea class="score" cols="40" rows="1">0</textarea>
  </div>
  <div class="row">
    <textarea class="player" cols="40" rows="1">Spieler 2</textarea>
    <textarea class="score" cols="40" rows="1">0</textarea>
  </div>
  <div class="row">
    <textarea class="player" cols="40" rows="1">Spieler 3</textarea>
    <textarea class="score" cols="40" rows="1">0</textarea>
  </div>
</div>

<input type="button" class="screenBtn" value="Spieler" onclick="changeScreen()"></input>
            
          
!
            
              html, body {
  margin: 0;
  overflow: hidden;
}

.question-board {
  display: none;
  background: url(http://vincenius.com/dist/images/background1.png) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  width: 100vw;
  height: 100vh;
  min-width: 1024px;
}

.points {
  display: none;
  background: url(http://vincenius.com/dist/images/background2.png) no-repeat center center fixed; 
  background-size: 100% 100%;
  width: 100vw;
  height: 100vh;
  min-width: 1024px;
}

.active {
  display: block;
}

.question-board .board {
  padding: 2.5%;
}

.question-board .row {
  height: calc(95vh);
  width: 20%;
  float: left;
}

textarea {
  background: transparent;
  color: #fff;
  border: none;
  width: 100%;
  font-size: 35px;
  margin-bottom: 25px;
  
  font-family: 'Carrois Gothic', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 2px 2px #000;
}

.question-board button {
  width: 100%;
  height: 15%;
  color: #fff;
  
  border: 1px solid white;
  font-family: 'Carrois Gothic', sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 50px
}

.question-board button:hover {
  cursor: pointer;
}

.question-board .row button:hover,
.question-board .row button.used {
  filter: brightness(30%);
}


/* Button colors orange*/
.question-board .row.orange button:nth-child(2) {
  background-color: #e46710;
}

.question-board .row.orange button:nth-child(3) {
  background-color: #b9530f;
}

.question-board .row.orange button:nth-child(4) {
  background-color: #8c420e;
}

.question-board .row.orange button:nth-child(5) {
  background-color: #76390d;
}

.question-board .row.orange button:nth-child(6) {
  background-color: #61310d;
}

/* Button colors blue*/
.question-board .row.blue button:nth-child(2) {
  background-color: #01a2dd;
}

.question-board .row.blue button:nth-child(3) {
  background-color: #0384b3;
}

.question-board .row.blue button:nth-child(4) {
  background-color: #066788;
}

.question-board .row.blue button:nth-child(5) {
  background-color: #085876;
}

.question-board .row.blue button:nth-child(6) {
  background-color: #0a4a5f;
}

/* Button colors pink*/
.question-board .row.pink button:nth-child(2) {
  background-color: #e12752;
}

.question-board .row.pink button:nth-child(3) {
  background-color: #b42244;
}

.question-board .row.pink button:nth-child(4) {
  background-color: #8c1e35;
}

.question-board .row.pink button:nth-child(5) {
  background-color: #771b2c;
}

.question-board .row.pink button:nth-child(6) {
  background-color: #621825;
}

/* Button colors darkblue*/
.question-board .row.darkblue button:nth-child(2) {
  background-color: #0a3c61;
}

.question-board .row.darkblue button:nth-child(3) {
  background-color: #0b3450;
}

.question-board .row.darkblue button:nth-child(4) {
  background-color: #0c2a3e;
}

.question-board .row.darkblue button:nth-child(5) {
  background-color: #0c2636;
}

.question-board .row.darkblue button:nth-child(6) {
  background-color: #0e202c;
}

/* Button colors green*/
.question-board .row.green button:nth-child(2) {
  background-color: #659e2d;
}

.question-board .row.green button:nth-child(3) {
  background-color: #558229;
}

.question-board .row.green button:nth-child(4) {
  background-color: #41651e;
}

.question-board .row.green button:nth-child(5) {
  background-color: #39561d;
}

.question-board .row.green button:nth-child(6) {
  background-color: #31481a;
}

.round-info {
  position: absolute;
  color: #000;
  bottom: 5px;
  left: 5px;
}

.screenBtn {
  position: absolute;
  color: #000;
  bottom: 5px;
  right: 5px;
}

.points .row {
  width: 33.2%;
  float: left;
}

.points .player {
  margin-top: 33vh;
  font-size: 50px;
}

.points .score {
  top: 60vh;
  transform: translateY(-50%);
  font-size: 80px;
  width: 33%;
  position: absolute;
}
            
          
!
            
              $( ".question-board button" ).click(function() {
  $( this ).toggleClass( "used" );
});

$('body').keyup(function(e){
  if (e.keyCode == 39 || e.keyCode == 37) {
    changeScreen();
  }
});

function changeScreen() {
  $( ".question-board" ).toggleClass( "active" );
  $( ".points" ).toggleClass( "active" );
  
  if ($(".screenBtn").attr('value') === "Spieler") {
    $(".screenBtn").attr('value', 'Fragen');
  } else {
    $(".screenBtn").attr('value', 'Spieler');
  }
}

function nextround() {
  if ($( ".question-board button" ).html() === "100") {
    $( ".question-board button" ).each( function() {
      let button = $(this);
      button.html(button.html() * 2);
    });
    $(".round-info").attr('value', 'Punkte halbieren');
  } else {
        $( ".question-board button" ).each( function() {
      let button = $(this);
      button.html(button.html() / 2);
      $(".round-info").attr('value', 'Punkte verdoppeln');
    });
  }
}
            
          
!
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