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

              
                
<div class='center'>
  <p>Click on the square following this color sequence</p>
<input id='side1' type="checkbox" />
<input id='side2' type="checkbox" />
<input id='side3' type="checkbox" />
<input id='side4' type="checkbox" />
<input id='side5' type="checkbox" />
<input id='side6' type="checkbox" />
<div class="resultado"></div>
 </div>
<div class="container">
  <div class="cube">
    <label for='side1' class="side side1"></label>
    <label for='side2' class="side side2"></label>
    <label for='side3' class="side side3"></label>
    <label for='side4' class="side side4"></label>
    <label for='side5' class="side side5"></label>
    <label for='side6' class="side side6"></label>
  </div>
</div>
              
            
!

CSS

              
                body{
  height:100vh;
}
.container{
  position:absolute;
  height:200px;
  width:200px;
  left:50%;
  top:50%;
  -webkit-transform: translateX(-50%) translateY(-50%);
          transform: translateX(-50%) translateY(-50%);
  -webkit-perspective:400px;
          perspective:400px;
}

.center{text-align:center; width: 100%;}

.resultado{display:block; width:100%;  margin:0 auto; font-size:3rem  } 
.resultado:before, .resultado:after{content:'YOU LOSE';background: rgba(204, 51, 51, .8);display:none;z-index: 9999; height:50vh;  top: 0;bottom: 0;left: 0;right: 0; position:absolute; margin:auto; text-align:center; line-height:50vh}
.resultado:before{content:'YOU WIN'; background: rgba(65, 195,172, .8);}



input:checked  + input:checked +input:checked +input:checked +input:checked + input:checked ~ .resultado:before{display:block;}
input:checked  + input:checked +input:checked +input:checked +input:checked + input:checked ~ .resultado:after{display:none;}


input ~ input:checked ~ .resultado:after{display:block;  }
input:checked  + input:checked ~ .resultado:after{display:none;  }
input:checked  + input:checked + input:checked ~ .resultado:after{display:none;  }
input:checked  + input:checked  + input:checked + input:checked ~ .resultado:after{display:none;  }

input:checked  + input:checked  + input:checked + input:checked ~ input + input:checked ~ .resultado:after{display:block;  }
input:checked  + input:checked  + input:checked + input:checked ~ input:checked ~ .resultado:after{display:none;  }
input:checked  + input:checked + input ~ input:checked ~ .resultado:after{display:block;  }
input{border-radius:50%; margin:15px ;}

#side1{box-shadow: 0 0 0 8px #41C3AC}
#side2{box-shadow: 0 0 0 8px #FF884D}
#side3{box-shadow: 0 0 0 8px #32526E}
#side4{box-shadow: 0 0 0 8px #65A2C5}
#side5{box-shadow: 0 0 0 8px #FFCC5C}
#side6{box-shadow: 0 0 0 8px #FF5557}
input:checked{ box-shadow: 0 0 0 8px #333 !important}
.side:hover{z-index: 9999;}

.cube{
  height:200px;
  widht:200px;
  -webkit-transform-origin:50% 50%;
          transform-origin:50% 50%;
  -webkit-transform-style:preserve-3d;
          transform-style:preserve-3d;
  -webkit-animation:rotate 8s infinite ease-in-out;
          animation:rotate 8s infinite ease-in-out;
  
}
.side{
  position:absolute;
  display:block;
  height:200px;
  width:200px;
}
.side1{
  background:#41C3AC;
  -webkit-transform:translateZ(100px);
          transform:translateZ(100px);
}
.side2{
  background:#FF884D; 
  -webkit-transform:rotateY(90deg) translateZ(100px);
          transform:rotateY(90deg) translateZ(100px);
}
.side3{
  background:#32526E; 
  -webkit-transform:rotateY(180deg) translateZ(100px);
          transform:rotateY(180deg) translateZ(100px);
}
.side4{
  background:#65A2C5;
  -webkit-transform:rotateY(-90deg) translateZ(100px);
          transform:rotateY(-90deg) translateZ(100px);
}
.side5{
  background:#FFCC5C;
  -webkit-transform:rotateX(90deg) translateZ(100px);
          transform:rotateX(90deg) translateZ(100px);
}
.side6{
  background:#FF5557;
  -webkit-transform:rotateX(-90deg) translateZ(100px);
          transform:rotateX(-90deg) translateZ(100px);
}

@-webkit-keyframes rotate{
  0%{
    -webkit-transform:rotateX(0deg) rotateY(0deg);
  }
  40%{
     -webkit-transform:rotateX(375deg) rotateY(0deg);
  }
  47%,50%{
     -webkit-transform:rotateX(360deg) rotateY(0deg);    
  }
  90%{
     -webkit-transform:rotateX(360deg) rotateY(375deg);
  }
  97%,100%{
     -webkit-transform:rotateX(360deg) rotateY(360deg);
  }
}
@keyframes rotate{
  0%{
    transform:rotateX(0deg) rotateY(0deg);
  }
  40%{
    transform:rotateX(375deg) rotateY(0deg);
  }
  47%,50%{
    transform:rotateX(360deg) rotateY(0deg);    
  }
  90%{
    transform:rotateX(360deg) rotateY(375deg);
  }
  97%,100%{
    transform:rotateX(360deg) rotateY(360deg);
  }
}

a{
  font-family:helvetica;
  color:#428bca;
  text-align:center;
  display:block;
}
              
            
!

JS

              
                //by https://codepen.io/Jordanoaragao and https://codepen.io/magnus16
 
              
            
!
999px

Console