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="container" ontouchstart="this.classList.toggle('hover');">
  <div class="card">  
    <div class="card_front">
      <h1 class="card-symbol">&#128628;</h1>
    </div>

    <div class="card_back">
      <h1 class="card-symbol">&#128628;</h1>
      <div class="card-text">
        <p>The word <strong>ampersand</strong> is a corruption of the phrase "and per se & (and)", meaning "and intrinsically the word and (represented by the symbol &)".</p>
      <p>The ampersand can be traced back to the 1st century A.D. and the Old Roman cursive, in which the letters E and T occasionally were written together to form a ligature.</p>
      </div>
    </div>    

  </div>
</div>

              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Cantata+One');
@import url('https://fonts.googleapis.com/css?family=Lato');

html {
  box-sizing: border-box;
  font-family: 'Lato', sans-serif;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  background-color: #bdc2e8;
  background-image: linear-gradient(to top, #bdc2e8 0%, #bdc2e8 1%, #e6dee9 100%);
  background-repeat: no-repeat;
}

/* CARD STYLING */

.container,
.card,
.card_front,
.card_back {
  width: 397px;
  height: 640px;
  margin: 3em auto;  
}

.card_front,
.card_back {  
/*   height: 100%; */
  background: url('http://i280.photobucket.com/albums/kk195/thelittleblacksmith/lobster-nebula_zps2j1cvbkx.jpg') no-repeat;
  box-shadow: 0px 5px 25px 0px rgba(51,51,51,0.28); 
}

.card-symbol {
  margin: 0;
  width: 100%;
  text-align: center;
  color: #000;
  font-family: 'Cantata One', serif;
  font-size: 13em;  
  mix-blend-mode: lighten;
}

@supports(display:flex){
 .card_front {  
    display: flex;
    align-items: center;
    justify-content: center;
  } 
  
  .card_front .card-symbol {  
    margin: 0 0.15em;
    border-radius: 50%;
    font-size: 15em;  
  }
}

.card_front {
  position: relative;
  padding: 0 1em;
}

.card_front .card-symbol {    
  font-size: 15em;  
}



.card_back {
/*   display: none; */
  padding: 1em;
}

.card_front > *,
.card_back > * {
  background-color: white;
  background-color: rgba(255, 255, 255, 0.75);  
}

.card-text {
  padding: 0 4.5em 1em;
  line-height: 1.4;
}

p:first-of-type {    
  margin-top: 0;
  padding: 1.5em 0 0;
  border-top: 8px solid #333;
}

/* FLIP CARD STYLING */
.container {
  perspective: 1000px;
}

.container:hover .card, 
.container.hover {
  transform: rotateY(-180deg);
}

.card {
  transition: 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

.card_front,
.card_back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
}

.card_front {
  z-index: 2;
  transform: rotateY(0deg);
}

.card_back {
  transform: rotateY(-180deg);
}
              
            
!

JS

              
                /*  
TUTORIALS:

CSS Flip: https://davidwalsh.name/css-flip
Knockout Text: https://codepen.io/thebabydino/pen/qONMLv?editors=110

*/
              
            
!
999px

Console