cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

    <script src="//use.edgefonts.net/questrial:n4:all.js"></script>

      .card{:onmouseup => "fnccardswap('cardfront1', 'cardback1')"}
          %h3.cardtext Hello
          %h3.cardtext Bonjour
      .card{:onmouseup => "fnccardswap('cardfront2', 'cardback2')"}
          %h3.cardtext Car
          %h3.cardtext Voiture  
      .card{:onmouseup => "fnccardswap('cardfront3', 'cardback3')"}
          %h3.cardtext Truck
          %h3.cardtext Camion
      .card{:onmouseup => "fnccardswap('cardfront4', 'cardback4')"}
          %h3.cardtext Window
          %h3.cardtext Fenêtre
      .card{:onmouseup => "fnccardswap('cardfront5', 'cardback5')"}
          %h3.cardtext Goodbye
          %h3.cardtext Au revoir    
      .card{:onmouseup => "fnccardswap('cardfront6', 'cardback6')"}
          %h3.cardtext To eat
          %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' );


Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.


Loading ..................