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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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
  %head
    <script src="//use.edgefonts.net/questrial:n4:all.js"></script>

  %body
    .container
      .card{:onmouseup => "fnccardswap('cardfront1', 'cardback1')"}
        #cardfront1.visible.cardfront  
          %h3.cardtext Hello
        #cardback1.hidden.cardback
          %h3.cardtext Bonjour
      .card{:onmouseup => "fnccardswap('cardfront2', 'cardback2')"}
        #cardfront2.visible  
          %h3.cardtext Car
        #cardback2.hidden
          %h3.cardtext Voiture  
      .card{:onmouseup => "fnccardswap('cardfront3', 'cardback3')"}
        #cardfront3.visible  
          %h3.cardtext Truck
        #cardback3.hidden
          %h3.cardtext Camion
      .card{:onmouseup => "fnccardswap('cardfront4', 'cardback4')"}
        #cardfront4.visible  
          %h3.cardtext Window
        #cardback4.hidden
          %h3.cardtext Fenêtre
      .card{:onmouseup => "fnccardswap('cardfront5', 'cardback5')"}
        #cardfront5.visible  
          %h3.cardtext Goodbye
        #cardback5.hidden
          %h3.cardtext Au revoir    
      .card{:onmouseup => "fnccardswap('cardfront6', 'cardback6')"}
        #cardfront6.visible.cardfront  
          %h3.cardtext To eat
        #cardback6.cardback.hidden
          %h3.cardtext Manger    


            
          
!
            
              @import "compass";
$color-main: #0A259E; $color-second: #395DFF; $color-third: #1D43EB; $color-contrast: #9E7700; $color-contrast-second: #EBB71D; $light-neutral: #f3ecdb;
$small-radius: 5px; $big-radius: 10px;
$spacing: 10px;

html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

html {
  font-family: questrial, sans-serif;
  // background-color: $color-contrast-second;
  background-color: $color-contrast-second; // Old browsers
  @include filter-gradient($color-main, $color-third, horizontal); // IE6-9 fallback on horizontal gradient
  @include background-image(linear-gradient(left top,  $color-main 0%,$color-second 24%,$color-third 50%,$color-second 79%,$color-main 100%));
  height: 100%;
}

h1 {font-size: 10em;} h2 {font-size: 7em;} h3 {font-size: 5em;} h4 {font-size: 3em;} h5 {font-size: 1em;} p {font-size: 1em;}

.container {
  display: flex;
  flex-wrap: wrap;
}

.card {
  border-radius: $small-radius;
  flex: 1 1 20%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: $spacing;
  background: url("http://library.roblahoda.com/lines1.png");
  background-color: $light-neutral;
  box-shadow: 0 27px 55px 0 rgba(0, 0, 0, 0.3), 0 17px 17px 0 rgba(0, 0, 0, 0.15);
  backface-visibility: hidden;
}
.cardtext {
  color: $color-main;
  // background-color: green;
  margin: $spacing;
}
.cardfront {
  background-color: green;
}

.cardback {
  background-color: purple;
  // visibility: collapse;
}
.hidden {
  visibility: collapse;

}
.visible {
  visibility: visible;
}




            
          
!
            
              window.fnccardswap = function(cardfront, cardback) {
    //alert('it ran: ');

  if ( document.getElementById(cardfront).className.match(/(?:^|\s)visible(?!\S)/) ){
       document.getElementById(cardfront).className = document.getElementById(cardfront).className.replace( /(?:^|\s)visible(?!\S)/g , ' hidden' );
        document.getElementById(cardback).className = document.getElementById(cardback).className.replace( /(?:^|\s)hidden(?!\S)/g , ' visible' );
      
    } else {
      
        document.getElementById(cardfront).className = document.getElementById(cardfront).className.replace( /(?:^|\s)hidden(?!\S)/g , ' visible' );
        document.getElementById(cardback).className = document.getElementById(cardback).className.replace( /(?:^|\s)visible(?!\S)/g , ' hidden' );
  };
    
};

            
          
!
999px
Loading ..................

Console